source: trunk/openwrt/package/base-files/default/sbin/ifup @ 2993

Last change on this file since 2993 was 2993, checked in by nbd, 10 years ago

port wan_device changes from whiterussian to kamikaze

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 685 bytes
Line 
1#!/bin/sh
2[ $# = 0 ] && { echo "  $0 <group>"; exit; }
3. /etc/functions.sh
4. /etc/network.overrides
5[ "$FAILSAFE" != "true" -a -e /etc/config/network ] && . /etc/config/network
6
7ifdown $1
8
9debug "### ifup $type ###"
10type=$1
11
12if_proto=$(nvram get ${type}_proto)
13if=$(nvram get ${type}_ifname)
14
15case "$if_proto" in
16        pppoa) hotplug_dev register atm0; exit 0 ;;
17        pppoe)
18                ifconfig nas0 2>&- >&- || {
19                        hotplug_dev register atm0
20                        exit 0
21                }
22        ;;
23        none|"") exit 0;;
24esac
25
26[ "${if%%[0-9]*}" = "ppp" ] && if="$(nvram get ${type}_device)"
27
28if [ "${if%%[0-9]}" = "br" ]; then
29        for sif in $(nvram get ${type}_ifnames); do
30                hotplug_dev register "$sif"
31        done
32else
33        hotplug_dev register "$if"
34fi
Note: See TracBrowser for help on using the repository browser.