diff options
author | Silvino Silva <silvino@bk.ru> | 2017-08-02 01:18:23 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2017-08-02 01:18:23 +0100 |
commit | c0148601ebe2196375f26572624590cad2751845 (patch) | |
tree | 0f40548a2b5c8eaf9bd99423e21b8baf63b83d65 /core/conf/rc.d/wlan | |
parent | 5ff68b8c191272fe9c80765fa6ac11c18aee3224 (diff) | |
parent | 65167272a3ba52dc4d032a1c60a9ff030408047d (diff) | |
download | doc-c0148601ebe2196375f26572624590cad2751845.tar.gz |
Merge branch 'r-0.3.1' into develop
Diffstat (limited to 'core/conf/rc.d/wlan')
-rwxr-xr-x | core/conf/rc.d/wlan | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/core/conf/rc.d/wlan b/core/conf/rc.d/wlan index 894a69c..86910bc 100755 --- a/core/conf/rc.d/wlan +++ b/core/conf/rc.d/wlan @@ -2,15 +2,17 @@ # # /etc/rc.d/wlan: start/stop wireless interface # + DEV=wlp7s0 + SSD=/sbin/start-stop-daemon PROG_DHCP=/sbin/dhcpcd PROG_WIFI=/usr/sbin/wpa_supplicant -PID_DHCP=/var/run/dhcpcd-${DEV}.pid +PID_DHCP=/var/run/dhcpcd.pid PID_WIFI=/var/run/wpa_supplicant.pid -OPTS_DHCP="-h $(/bin/hostname) -C resolv.conf $DEV" +OPTS_DHCP="--waitip -h $(/bin/hostname) -z $DEV" OPTS_WIFI="-B -P $PID_WIFI -D nl80211,wext -c /etc/wpa_supplicant.conf -i $DEV" print_status() { @@ -30,13 +32,15 @@ case $1 in RETVAL=$? ;; stop) - ( $SSD --stop --retry 10 --pidfile $PID_DHCP + ( $SSD --stop --retry 10 --pidfile $PID_DHCP $SSD --stop --retry 10 --pidfile $PID_WIFI ) + RETVAL=$? - /sbin/ip route del default dev ${DEV} - /sbin/ip route flush dev ${DEV} - /sbin/ip link set ${DEV} down - /sbin/ip addr flush dev ${DEV} + /sbin/ip route del default dev ${DEV} + /sbin/ip route flush dev ${DEV} + /sbin/ip link set ${DEV} down + /sbin/ip addr flush dev ${DEV} + ;; restart) $0 stop @@ -54,4 +58,3 @@ esac exit $RETVAL # End of file - |