diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-11-28 16:13:23 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-11-28 16:13:23 +0000 |
commit | f479350b0c414a45de9467f16590c93fda1d6d7d (patch) | |
tree | ba0c51a46a23dc891f3532cc21df1f8c429b7bbc /package | |
parent | 7e3703d49f9431c51a4164f3fabfcdfaebd87a6a (diff) |
fix ifup (no longer use the to-be-reverted state of the previous config)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13398 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/sbin/ifup | 18 |
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 |