add support for if{down,up} -a and implement proper start/stop/restart for /etc/init...
[openwrt/svn-archive/archive.git] / package / base-files / files / sbin / ifdown
index 103309fa841e1a48a357790e14a5591506ec990d..540c69f169115efe2981aa4b050ff1e9f7f6ca5a 100755 (executable)
@@ -1,8 +1,15 @@
 #!/bin/sh
 # Copyright (C) 2006 OpenWrt.org
 
-[ $# = 0 ] && { echo "  $0 <group>"; exit; }
 . /etc/functions.sh
+[ $# = 0 ] && { echo "  $0 <group>"; exit; }
+[ "x$1" = "x-a" ] && {
+       config_cb() {
+               [ -z "$2" ] || eval "$0 $2"
+       }
+       config_load network
+       exit
+}
 include /lib/network
 scan_interfaces