aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-11-28 16:13:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-11-28 16:13:23 +0000
commit7ac69660fe13ff3f6651a13bcfd2d0470478f900 (patch)
tree4c1d3a609198d3464bf7f5b030891f424aaae35a /package/base-files
parentc79c1efd274c77584ed0eeba88c8a7f44bde00ce (diff)
downloadupstream-7ac69660fe13ff3f6651a13bcfd2d0470478f900.tar.gz
upstream-7ac69660fe13ff3f6651a13bcfd2d0470478f900.tar.bz2
upstream-7ac69660fe13ff3f6651a13bcfd2d0470478f900.zip
fix ifup (no longer use the to-be-reverted state of the previous config)
SVN-Revision: 13398
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/sbin/ifup18
1 files changed, 15 insertions, 3 deletions
diff --git a/package/base-files/files/sbin/ifup b/package/base-files/files/sbin/ifup
index 81ec2c0890..96f7bea357 100755
--- a/package/base-files/files/sbin/ifup
+++ b/package/base-files/files/sbin/ifup
@@ -1,11 +1,23 @@
#!/bin/sh
# Copyright (C) 2006 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
+config_get ifname "$1" device
for dev in $ifname; do
setup_interface "$dev" "$1"
done