aboutsummaryrefslogtreecommitdiffstats
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
commitc0432f5687f38aa6e3bf0a66b26aed74649c9e28 (patch)
treeaf2e7e9d4aafea304a7207a165d77451a269ced5
parent6905093fe482dca8c20d44aee9dc3e1883fc61d2 (diff)
downloadupstream-c0432f5687f38aa6e3bf0a66b26aed74649c9e28.tar.gz
upstream-c0432f5687f38aa6e3bf0a66b26aed74649c9e28.tar.bz2
upstream-c0432f5687f38aa6e3bf0a66b26aed74649c9e28.zip
[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
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/sbin/wifi8
2 files changed, 6 insertions, 4 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index c3b0350889..2b1cfa13b3 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files
-PKG_RELEASE:=88
+PKG_RELEASE:=89
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index 2e66bfcbe8..5cbf50b5f5 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() {