netifd: localize internally used shell variables (#11567)
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 11 Jun 2012 13:25:58 +0000 (13:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 11 Jun 2012 13:25:58 +0000 (13:25 +0000)
SVN-Revision: 32192

package/netifd/files/lib/netifd/proto/dhcp.sh
package/netifd/files/lib/network/config.sh

index 70cfc86d18018a927172c31965c5439bd40396fc..3365cb7aebc7da7507d843c543800b4dca834658 100755 (executable)
@@ -18,6 +18,7 @@ proto_dhcp_setup() {
        local config="$1"
        local iface="$2"
 
+       local ipaddr hostname clientid vendorid broadcast reqopts
        json_get_vars ipaddr hostname clientid vendorid broadcast reqopts
 
        local opt dhcpopts
index 3b3ae93404849a9b4ff63747df9c9c638ed9fdc3..9128971dab04305d25f5c65520471ebf2545c5f6 100755 (executable)
@@ -5,6 +5,7 @@
 
 find_config() {
        local device="$1"
+       local ifdev ifl3dev ifobj
        for ifobj in `ubus list network.interface.\*`; do
                interface="${ifobj##network.interface.}"
                (
@@ -36,7 +37,7 @@ ubus_call() {
 
 fixup_interface() {
        local config="$1"
-       local ifname type
+       local ifname type device l3dev
 
        config_get type "$config" type
        config_get ifname "$config" ifname