]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - etc/rc.d/downinterfaces
Add an rc script for powerd(8).
[FreeBSD/FreeBSD.git] / etc / rc.d / downinterfaces
1 #!/bin/sh
2 #
3 # $NetBSD: downinterfaces,v 1.2 2001/09/04 20:40:40 martin Exp $
4 #
5
6 # PROVIDE: downinterfaces
7 # KEYWORD: shutdown
8
9 if [ "x$1" != "xstop" ]; then exit 0; fi
10
11 . /etc/rc.conf
12
13 tmp=`ifconfig -lu`
14 iflist=""
15 for int in $tmp; do
16         case $int in
17         pppoe*) iflist="$iflist $int"
18                 ;;
19         esac
20 done
21 iflist="$iflist $force_down_interfaces"
22 if [ "$iflist" = "" ] || [ "$iflist" = " " ]; then exit 0; fi
23
24 echo "Shutting down interfaces:$iflist"
25 for int in $iflist; do
26         ifconfig $int down
27 done