summaryrefslogtreecommitdiff
path: root/etc/rc.d/downinterfaces
blob: 24f119703e7fcf52d23ad2e99eeed1a53a1b7dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
#
# $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $
#

# PROVIDE: downinterfaces
# KEYWORD: shutdown

if [ "x$1" = "xstop" ]; then

. /etc/rc.conf

tmp=`ifconfig -lu`
iflist=""
for int in $tmp; do
	case $int in
	pppoe*)	iflist="$iflist $int"
		;;
	esac
done
iflist="$iflist $force_down_interfaces"
if [ "$iflist" != "" ] && [ "$iflist" != " " ]
then

	echo "Shutting down interfaces:$iflist"
	for int in $iflist; do
		ifconfig $int down
	done
fi

fi