summaryrefslogtreecommitdiff
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-11-08 14:42:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-11-08 14:42:58 +0000
commita73fffe85735f0417902ad3f43abc15348005713 (patch)
treef64a6f8ddc811814b8e97b8f3f95da1a9a60934c /package/base-files/files
parentec20b840484a53594775dfa6939f93d7bbaf1e29 (diff)
downloadmtk-20170518-a73fffe85735f0417902ad3f43abc15348005713.zip
mtk-20170518-a73fffe85735f0417902ad3f43abc15348005713.tar.gz
mtk-20170518-a73fffe85735f0417902ad3f43abc15348005713.tar.bz2
base-files: properly handle wifi ifaces with no network attached, useful for unmanaged interfaces like used for batman or monitoring
SVN-Revision: 28860
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/sbin/wifi8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 2e66bfc..5cbf50b 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -129,9 +129,11 @@ start_net() {(
local vifmac="$3"
[ -f "/var/run/$iface.pid" ] && kill "$(cat /var/run/${iface}.pid)" 2>/dev/null
- include /lib/network
- scan_interfaces
- setup_interface "$iface" "$config" "" "$vifmac"
+ [ -z "$config" ] || {
+ include /lib/network
+ scan_interfaces
+ setup_interface "$iface" "$config" "" "$vifmac"
+ }
)}
set_wifi_up() {