xref: /netbsd/etc/rc.d/downinterfaces (revision c4a72b64)
1#!/bin/sh
2#
3# $NetBSD: downinterfaces,v 1.4 2002/08/16 18:05:19 martin Exp $
4#
5
6# PROVIDE: downinterfaces
7# KEYWORD: shutdown
8
9if [ "x$1" = "xstop" ]; then
10
11. /etc/rc.conf
12
13tmp=`ifconfig -lu`
14iflist=""
15for int in $tmp; do
16	case $int in
17	pppoe*)	iflist="$iflist $int"
18		;;
19	esac
20done
21iflist="$iflist $force_down_interfaces"
22if [ "$iflist" != "" ] && [ "$iflist" != " " ]
23then
24
25	echo "Shutting down interfaces:$iflist"
26	for int in $iflist; do
27		ifconfig $int down
28	done
29fi
30
31fi
32