summaryrefslogtreecommitdiffstats
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-08 14:42:58 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-08 14:42:58 +0000
commit43e043890d5b61b05c819b3ad866edf5f874352d (patch)
treeaf2e7e9d4aafea304a7207a165d77451a269ced5 /package/base-files/files/sbin
parent51f0f920a86889afc951135cf7421131a7496202 (diff)
[package] base-files: properly handle wifi ifaces with no network attached, useful for unmanaged interfaces like used for batman or monitoring
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28860 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/sbin')
-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 2e66bfcbe..5cbf50b5f 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() {