mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-31 16:35:44 +00:00
fix ifup (no longer use the to-be-reverted state of the previous config)
SVN-Revision: 13398
This commit is contained in:
parent
c79c1efd27
commit
7ac69660fe
@ -1,11 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
. /sbin/ifdown "$@"
|
/sbin/ifdown "$@"
|
||||||
|
|
||||||
|
. /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 iftype "$1" type
|
|
||||||
config_get ifname "$1" device
|
config_get ifname "$1" device
|
||||||
|
|
||||||
for dev in $ifname; do
|
for dev in $ifname; do
|
||||||
setup_interface "$dev" "$1"
|
setup_interface "$dev" "$1"
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user