Root/package/base-files/files/sbin/ifup

1#!/bin/sh
2# Copyright (C) 2006-2011 OpenWrt.org
3
4/sbin/ifdown "$@"
5
6. /etc/functions.sh
7[ $# = 0 ] && { echo " $0 <group>"; exit; }
8[ "x$1" = "x-a" ] && {
9    [ -e "/tmp/resolv.conf.auto" ] && rm /tmp/resolv.conf.auto
10    config_cb() {
11        [ interface != "$1" -o -z "$2" ] || eval "$0 $2"
12    }
13    config_load network
14    exit
15}
16
17include /lib/network
18scan_interfaces
19
20config_get ifname "$1" device
21for dev in ${ifname:-$1}; do
22    setup_interface "$dev" "$1"
23done
24

Archive Download this file



interactive