[OpenWrt-Devel] [PATCH] netifd: ifup-shellscript - fix wrong usage of 'local'

Bastian Bittorf bittorf at bluebottle.com
Mon Dec 7 08:47:49 EST 2015

this error was not visible until recent bump to
busybox 1.24.1 stable which introduced a warning message
when keyword 'local' is not used with a shell-function.

this does not change behavior and is a cosmetic cleanup.
fixes the following output:

root at box:~ ifup <interface>
/sbin/ifup: local: line 362: not in a function
/sbin/ifup: local: line 362: not in a function
/sbin/ifup: local: line 1: not in a function

Signed-off-by: Bastian Bittorf <bittorf at bluebottle.com>
 package/network/config/netifd/files/sbin/ifup | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/network/config/netifd/files/sbin/ifup b/package/network/config/netifd/files/sbin/ifup
index af3aaa8..5515b91 100755
--- a/package/network/config/netifd/files/sbin/ifup
+++ b/package/network/config/netifd/files/sbin/ifup
@@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
-	local radio_devs
-	local network="$1"
+	network="$1"
 	config_load wireless
 	config_foreach find_related_radios wifi-iface
-	local dev
 	for dev in $(echo "$radio_devs" | sort -u); do
 		/sbin/wifi up "$dev"
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list