updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / autowifi / iproute2.patch
blob81455755e884a3f32a9e283824cd52d1acc0ac77
1 diff --git a/etc/rc.d/autowifi b/etc/rc.d/autowifi
2 index 7419ae7..e966c3a 100755
3 --- a/etc/rc.d/autowifi
4 +++ b/etc/rc.d/autowifi
5 @@ -17,6 +17,12 @@ WPA_CLI="/usr/sbin/wpa_cli"
6 AUTOWIFI="/usr/sbin/wpa_actiond"
7 PIDFILE="/var/run/autowifi-${INTERFACE}.pid"
9 +ifdown() {
10 + hash ip &> /dev/null && ip link set $1 down && return
11 + hash ifconfig &> /dev/null && ifconfig $1 down && return
12 + echo "could not bring interface $1 down" >&2
15 case "$1" in
16 start)
17 stat_busy "Starting autowifi"
18 @@ -41,7 +47,7 @@ case "$1" in
19 kill $(cat ${PIDFILE})
20 rm -f ${PIDFILE}
22 - ifconfig ${INTERFACE} down
23 + ifdown ${INTERFACE}
24 rm_daemon autowifi
25 stat_done