From a73fffe85735f0417902ad3f43abc15348005713 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 8 Nov 2011 14:42:58 +0000 Subject: base-files: properly handle wifi ifaces with no network attached, useful for unmanaged interfaces like used for batman or monitoring SVN-Revision: 28860 --- package/base-files/files/sbin/wifi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'package/base-files/files/sbin/wifi') 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() { -- cgit v1.1