summaryrefslogtreecommitdiff
path: root/package/base-files/files/sbin
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-07 15:28:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-07 15:28:48 +0000
commitc05eb4ba633caf6485c8df6544a28c1548b7bc44 (patch)
tree1041b940cad714ab66babacec39f42ced15f57c2 /package/base-files/files/sbin
parent9c8bb0241fd3a2e8eef36f5cb1187a11f8a8b488 (diff)
downloadmtk-20170518-c05eb4ba633caf6485c8df6544a28c1548b7bc44.zip
mtk-20170518-c05eb4ba633caf6485c8df6544a28c1548b7bc44.tar.gz
mtk-20170518-c05eb4ba633caf6485c8df6544a28c1548b7bc44.tar.bz2
add basic interface alias support. for now (since we don't use ip in our network scripts yet), it adds :1, :2, ... alias interfaces this will change when we add support for the ip utility, but the config format will remain the same. example:
config alias test option interface lan option ipaddr 192.168.1.1 option netmask 255.255.0.0 SVN-Revision: 12241
Diffstat (limited to 'package/base-files/files/sbin')
-rwxr-xr-xpackage/base-files/files/sbin/ifdown6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/ifdown b/package/base-files/files/sbin/ifdown
index 7cc87de..9eadad3 100755
--- a/package/base-files/files/sbin/ifdown
+++ b/package/base-files/files/sbin/ifdown
@@ -64,4 +64,8 @@ config_get iftype "$cfg" type
# remove the interface's network state
uci_revert_state network "$1"
-
+# revert aliases state as well
+config_get aliases "$1" aliases
+for config in $aliases; do
+ uci_revert_state network "$config"
+done