X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fbase-files%2Ffiles%2Flib%2Fnetwork%2Fconfig.sh;h=8188203d31726a73d705bb6735b8ebd7bcb8a251;hp=90f5bf742414659f0916d90b9b7b3acbc359d705;hb=b8694ccee6097b87a9b0567b014d435741dde6de;hpb=1a1cda3e4cc68df91ea4a03f08c51d00191a62c9 diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 90f5bf7424..8188203d31 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -66,6 +66,7 @@ setup_interface() { local iface="$1" local config="$2" local proto + local macaddr [ -n "$config" ] || { config=$(find_config "$iface") @@ -76,7 +77,8 @@ setup_interface() { config_get iftype "$config" type ifconfig "$iface" 2>/dev/null >/dev/null && { - # make sure the interface is removed from any existing bridge + # make sure the interface is removed from any existing bridge and brought down + ifconfig "$iface" down unbridge "$iface" } @@ -101,7 +103,8 @@ setup_interface() { # Interface settings config_get mtu "$config" mtu - $DEBUG ifconfig "$iface" ${mtu:+mtu $mtu} up + config_get macddr "$config" macaddr + $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up pidfile="/var/run/$iface.pid" case "$proto" in