From: Jo-Philipp Wich Date: Fri, 28 May 2010 00:59:19 +0000 (+0000) Subject: [package] base-files: bring bridge port iface down before changing the mac (#7111) X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=25465ecf9863a358a8ac8fd9616ee630f289da50 [package] base-files: bring bridge port iface down before changing the mac (#7111) SVN-Revision: 21595 --- diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 32170bb274..37dc2085fb 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -170,6 +170,8 @@ prepare_interface() { # result in another setup_interface() call, so we simply stop processing # the current event at this point. } + + [ -n "$macaddr" ] && ifconfig "$iface" down 2>/dev/null >/dev/null ifconfig "$iface" ${macaddr:+hw ether "${macaddr}"} up 2>/dev/null >/dev/null return 1 }