netifd: ifup-shellscript - fix wrong usage of 'local'
authorFelix Fietkau <nbd@openwrt.org>
Thu, 10 Dec 2015 12:53:30 +0000 (12:53 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 10 Dec 2015 12:53:30 +0000 (12:53 +0000)
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@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@bluebottle.com>
SVN-Revision: 47828

package/network/config/netifd/files/sbin/ifup

index af3aaa8453ce93f52c2b89e743f43f9c509ad696..5515b91f76df2b5c36d46ac4b86dfc9bdcd78b1d 100755 (executable)
@@ -67,12 +67,10 @@ if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
                fi
        }
 
-       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"
        done