1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/etc/rc.d/downinterfaces
2002-06-21 19:07:21 +00:00

28 lines
486 B
Bash

#!/bin/sh
#
# $NetBSD: downinterfaces,v 1.2 2001/09/04 20:40:40 martin Exp $
#
# PROVIDE: downinterfaces
# KEYWORD: shutdown
if [ "x$1" != "xstop" ]; then exit 0; fi
. /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 exit 0; fi
echo "Shutting down interfaces:$iflist"
for int in $iflist; do
ifconfig $int down
done