etc/services - sync with NetBSD-8
[minix.git] / etc / rc.d / downinterfaces
blobdac0997739ddff9a6e23e74485f894f8874d2bdc
1 #!/bin/sh
3 # $NetBSD: downinterfaces,v 1.6 2009/09/05 16:26:07 apb Exp $
6 # PROVIDE: downinterfaces
7 # KEYWORD: nostart shutdown
9 $_rc_subr_loaded . /etc/rc.subr
11 name="downinterfaces"
12 start_cmd=":"
13 stop_cmd="downinterfaces_stop"
15 downinterfaces_stop()
17 tmp=$(ifconfig -lu)
18 iflist=""
19 for int in $tmp; do
20 case $int in
21 pppoe*) iflist="$iflist $int"
23 esac
24 done
25 iflist="$iflist $force_down_interfaces"
26 if [ "$iflist" != "" ] && [ "$iflist" != " " ]
27 then
29 echo "Shutting down interfaces:$iflist"
30 for int in $iflist; do
31 ifconfig $int down
32 done
36 load_rc_config $name
37 run_rc_command "$1"