[package] base-files: fix error reporting for unsupported protocols on virtual interfaces
[openwrt.git] / package / base-files / files / sbin / ifup
index 81ec2c0..6acd2ed 100755 (executable)
@@ -1,11 +1,23 @@
 #!/bin/sh
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2011 OpenWrt.org
 
-/sbin/ifdown "$@"
+/sbin/ifdown "$@"
 
-config_get iftype "$1" type
-config_get ifname "$1" device
+. /etc/functions.sh
+[ $# = 0 ] && { echo "  $0 <group>"; exit; }
+[ "x$1" = "x-a" ] && {
+       [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto
+       config_cb() {
+               [ interface != "$1" -o -z "$2" ] || eval "$0 $2"
+       }
+       config_load network
+       exit
+}
+
+include /lib/network
+scan_interfaces
 
-for dev in $ifname; do
+config_get ifname "$1" device
+for dev in ${ifname:-$1}; do
        setup_interface "$dev" "$1"
 done
This page took 0.021734 seconds and 4 git commands to generate.