summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-05-28 00:59:19 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-05-28 00:59:19 +0000
commit976f789aba266bf9c9b86fc8cf15b95c51b344a2 (patch)
treed5b41d79ee78a5c8a06e57603ff0471e1300b524
parent2f1ada2c70861487f3364fd1c88e45954b411da3 (diff)
[package] base-files: bring bridge port iface down before changing the mac (#7111)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21595 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh2
1 files changed, 2 insertions, 0 deletions
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
}