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

Last change on this file since 2536 was 2536, checked in by nbd, 11 years ago

fix ifup/down for ppp-based stuff

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 620 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
26if [ "${if%%[0-9]}" = "br" ]; then
27        for sif in $(nvram get ${type}_ifnames); do
28                hotplug_dev register "$sif"
29        done
30else
31        hotplug_dev register "$if"
32fi
Note: See TracBrowser for help on using the repository browser.