fi
}
+ensure_wifi_on() {
+ if [ ! "$(wifi)" = "wifi = on" ]; then
+ sudo wifi on
+ fi
+}
+
print_usage() {
echo 'Available commands:'
echo ' eth_connect'
wicd-cli --wired --disconnect
elif [ "${1}" = 'wifi_scan' ]; then
+ ensure_wifi_on
wicd-cli --wireless --scan
wicd-cli --wireless --list-networks
wicd-cli --wireless --network="${2}" --network-property=key --set-to="${3}"
elif [ "${1}" = 'wifi_connect' ]; then
+ ensure_wifi_on
check_wifi_id_set "${2}"
wicd-cli --wireless --network="${2}" --connect