From: Felix Fietkau Date: Fri, 28 Nov 2008 16:13:23 +0000 (+0000) Subject: fix ifup (no longer use the to-be-reverted state of the previous config) X-Git-Tag: reboot~25148 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7ac69660fe13ff3f6651a13bcfd2d0470478f900;p=openwrt%2Fstaging%2Fblogic.git fix ifup (no longer use the to-be-reverted state of the previous config) SVN-Revision: 13398 --- diff --git a/package/base-files/files/sbin/ifup b/package/base-files/files/sbin/ifup index 81ec2c08908a..96f7bea3576d 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 "; 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