blob: 7321511a4ff20b5b472576fb52edc85d60f8f315 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
SHORT_NAME="genericwpawireless"
DESC_NAME="Generic WPA WIRELESS"
INTERFACE="{{ ws_minet_wireless_interface_name }}"
MODULE_NAME="{{ ws_minet_wireless_interface_module }}"
. /usr/local/lib/minet/minet_helpers.sh
case "$1" in
start|"")
echo "Connecting with $DESC_NAME"
activate_interface $INTERFACE $MODULE_NAME
wpa_supplicant -c/etc/wpa_supplicant.conf -i$INTERFACE -Dnl80211 -B
dhclient $INTERFACE -v -pf /var/run/dhclient.$SHORT_NAME.pid
;;
stop)
echo "Disconnecting from $DESC_NAME"
kill `cat /var/run/dhclient.$SHORT_NAME.pid`
rm /var/run/dhclient.$SHORT_NAME.pid
killall wpa_supplicant
deactivate_interface $INTERFACE $MODULE_NAME
;;
*)
exit 1
;;
esac
|