aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin/wifi
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-10-29 17:26:49 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-10-29 17:26:49 +0000
commit382a56d914fd45b0854cd2a770473c46810d0a85 (patch)
tree89c63dd19afe8179a1aba0e96724bf46b633795f /package/base-files/files/sbin/wifi
parenta3dae311fd51f6c35d5355d2fc6c31e6cdb138e0 (diff)
downloadupstream-382a56d914fd45b0854cd2a770473c46810d0a85.tar.gz
upstream-382a56d914fd45b0854cd2a770473c46810d0a85.tar.bz2
upstream-382a56d914fd45b0854cd2a770473c46810d0a85.zip
use pidfiles for hostapd/wpa_supplicant instead of killing all processes when bringing an interface down - fixes an issue with random hostapd death
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13078 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/sbin/wifi')
-rwxr-xr-xpackage/base-files/files/sbin/wifi2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 63e132d4f1..e9752c6039 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -84,6 +84,8 @@ set_wifi_down() {
local cfg="$1"
local vifs vif vifstr
+ [ -f "/var/run/wifi-${cfg}.pid" ] &&
+ kill "$(cat "/var/run/wifi-${cfg}.pid")"
uci_revert_state wireless "$cfg"
config_get vifs "$cfg" vifs
for vif in $vifs; do