source: freewrt/package/base-files/default/sbin/ifdown@ 257cbc3

freewrt_1_0 freewrt_2_0
Last change on this file since 257cbc3 was 257cbc3, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

use ifup/ifdown, hotplug and ppp scripts and options from known to work whiterussian

git-svn-id: svn://www.freewrt.org/trunk/freewrt@187 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100755
File size: 465 bytes
Line 
1#!/bin/sh
2[ $# = 0 ] && { echo " $0 <group>"; exit; }
3. /etc/functions.sh
4
5type=$1
6debug "### ifdown $type ###"
7
8if=$(nvram get ${type}_ifname)
9proto=$(nvram get ${type}_proto)
10if_valid $if && $DEBUG ifconfig $if down
11[ -r /var/run/${if}.pid ] && kill $(cat /var/run/${if}.pid 2>&-) 2>&-
12killall ifup.$proto >&- 2>&-
13case "$proto" in
14 pptp|pppoe) killall pppd >&- 2>&- ;;
15 static) env -i ACTION="ifdown" INTERFACE="$if" PROTO=static /sbin/hotplug "iface" ;;
16esac
17
Note: See TracBrowser for help on using the repository browser.