Browse Source

Prevent "SIOCSIFHWADDR: Device or resource busy" when trying to change mac address

SVN-Revision: 13258
Jo-Philipp Wich 17 years ago
parent
commit
789848d327
1 changed files with 1 additions and 0 deletions
  1. 1 0
      package/base-files/files/lib/network/config.sh

+ 1 - 0
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"