From: jow Date: Mon, 17 Nov 2008 10:47:02 +0000 (+0000) Subject: Prevent "SIOCSIFHWADDR: Device or resource busy" when trying to change mac address X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=b80bf0c001df10c7232c0e58cf386db413903a1c Prevent "SIOCSIFHWADDR: Device or resource busy" when trying to change mac address git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13258 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 9e7cff99a..9b4320507 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -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"