[package] base-files: r22444 caused interfaces to remain down if the macaddr option...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 2 Aug 2010 20:45:52 +0000 (20:45 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 2 Aug 2010 20:45:52 +0000 (20:45 +0000)
SVN-Revision: 22467

package/base-files/files/lib/network/config.sh

index 22828f83bbfccbf1e3a9c2ca87f4525c8f222166..a5bc9ac6f2c89a0f0f4a2281935d159c591f80d8 100755 (executable)
@@ -325,12 +325,12 @@ setup_interface() {
 
        # Interface settings
        grep "$iface:" /proc/net/dev > /dev/null && {
 
        # Interface settings
        grep "$iface:" /proc/net/dev > /dev/null && {
-               local mtu macaddr
+               local mtu macaddr txqueuelen
                config_get mtu "$config" mtu
                config_get macaddr "$config" macaddr
                config_get txqueuelen "$config" txqueuelen
                [ -n "$macaddr" ] && $DEBUG ifconfig "$iface" down
                config_get mtu "$config" mtu
                config_get macaddr "$config" macaddr
                config_get txqueuelen "$config" txqueuelen
                [ -n "$macaddr" ] && $DEBUG ifconfig "$iface" down
-               $DEBUG ifconfig "$iface_main" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} ${txqueuelen:+txqueuelen $txqueuelen} up
+               $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} ${txqueuelen:+txqueuelen $txqueuelen} up
        }
        set_interface_ifname "$config" "$iface"
 
        }
        set_interface_ifname "$config" "$iface"