X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/05adaa9794e41d02870a74a1ed7ba58cc59b9286..c07af084268733eab42dcccb1f8c076e0105f07b:/package/base-files/files/sbin/ifup diff --git a/package/base-files/files/sbin/ifup b/package/base-files/files/sbin/ifup index 81ec2c089..96f7bea35 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