home
·
contact
·
privacy
projects
/
config
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bullseye website setup fixes.
[config]
/
bin
/
wicd-wrapper.sh
diff --git
a/bin/wicd-wrapper.sh
b/bin/wicd-wrapper.sh
index 986343a6f29b2e5cb189158a6bcd5656cbe56bb2..8ed74bdf873cb741357b25346e9a5095f70fcdfd 100755
(executable)
--- a/
bin/wicd-wrapper.sh
+++ b/
bin/wicd-wrapper.sh
@@
-7,6
+7,12
@@
check_wifi_id_set() {
fi
}
fi
}
+ensure_wifi_on() {
+ if [ ! "$(wifi)" = "wifi = on" ]; then
+ sudo wifi on
+ fi
+}
+
print_usage() {
echo 'Available commands:'
echo ' eth_connect'
print_usage() {
echo 'Available commands:'
echo ' eth_connect'
@@
-29,6
+35,7
@@
elif [ "${1}" = 'eth_disconnect' ]; then
wicd-cli --wired --disconnect
elif [ "${1}" = 'wifi_scan' ]; then
wicd-cli --wired --disconnect
elif [ "${1}" = 'wifi_scan' ]; then
+ ensure_wifi_on
wicd-cli --wireless --scan
wicd-cli --wireless --list-networks
wicd-cli --wireless --scan
wicd-cli --wireless --list-networks
@@
-46,6
+53,7
@@
elif [ "${1}" = 'wifi_set_wpa' ]; then
wicd-cli --wireless --network="${2}" --network-property=key --set-to="${3}"
elif [ "${1}" = 'wifi_connect' ]; then
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
check_wifi_id_set "${2}"
wicd-cli --wireless --network="${2}" --connect