* Add this nice filesystem testing tool that I've recently
[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.1 2003/07/24 06:35:37 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
14 tmp=`ifconfig -lu`
15 iflist=""
16 for int in $tmp; do
17         case $int in
18         pppoe*) iflist="$iflist $int"
19                 ;;
20         esac
21 done
22 iflist="$iflist $force_down_interfaces"
23 if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
24
25 echo "Shutting down interfaces:$iflist"
26 for int in $iflist; do
27         ifconfig $int down
28 done