RIP PCVT userland.
[dragonfly.git] / etc / rc.d / downinterfaces
1 #!/bin/sh
2 #
3 # $NetBSD: downinterfaces,v 1.2 2001/09/04 20:40:40 martin Exp $
4 # $DragonFly: src/etc/rc.d/Attic/downinterfaces,v 1.2 2003/12/11 23:28:41 dillon Exp $
5 #
6
7 # PROVIDE: downinterfaces
8 # KEYWORD: shutdown
9
10 if [ "x$1" != "xstop" ]; then exit 0; fi
11
12 . /etc/rc.conf
13 dummy_rc_command "$1"
14
15 tmp=`ifconfig -lu`
16 iflist=""
17 for int in $tmp; do
18         case $int in
19         pppoe*) iflist="$iflist $int"
20                 ;;
21         esac
22 done
23 iflist="$iflist $force_down_interfaces"
24 if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
25
26 echo "Shutting down interfaces:$iflist"
27 for int in $iflist; do
28         ifconfig $int down
29 done