Prevent "SIOCSIFHWADDR: Device or resource busy" when trying to change mac address
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 17 Nov 2008 10:47:02 +0000 (10:47 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 17 Nov 2008 10:47:02 +0000 (10:47 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13258 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index 9e7cff9..9b43205 100755 (executable)
@@ -232,6 +232,7 @@ setup_interface() {
        config_get mtu "$config" mtu
        config_get macaddr "$config" macaddr
        grep "$iface:" /proc/net/dev > /dev/null && \
+               $DEBUG ifconfig "$iface" down && \
                $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
        set_interface_ifname "$config" "$iface"
 
This page took 0.027236 seconds and 4 git commands to generate.