Sync usage with man page.
[netbsd-mini2440.git] / etc / rc.d / downinterfaces
blob6cc5fe1e94329f7498901fafcbcb37e27edb21a5
1 #!/bin/sh
3 # $NetBSD: downinterfaces,v 1.5 2004/10/11 15:00:51 christos 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"