# cat wpa #!/bin/sh usage() { echo "Usage: $0 provider" echo "where provider is one of using providers" exit 1 } if [ $# -eq 0 ] then echo "No arguments supplied" usage fi case "$1" in "isp") echo "Connecting to ISP provider" cp /etc/wpa_supplicant/wpa_isp.conf /etc/wpa_supplicant/wpa_supplicant.conf herd stop networking herd stop wpa-supplicant sleep 2 herd start wpa-supplicant herd start networking ;; "bee") echo "bee" echo "Connecting to Beeline provider" cp /etc/wpa_supplicant/wpa_bee.conf /etc/wpa_supplicant/wpa_supplicant.conf herd stop networking herd stop wpa-supplicant sleep 2 herd start wpa-supplicant herd start networking ;; *) echo "Provider is not of cases" exit 2; esac