svn commit: r197146 - head/etc/rc.d

Hiroki Sato hrs at FreeBSD.org
Sat Sep 12 23:00:02 UTC 2009


Author: hrs
Date: Sat Sep 12 23:00:01 2009
New Revision: 197146
URL: http://svn.freebsd.org/changeset/base/197146

Log:
  Use is_wired_interface() instead of hard-coded interface device
  names.
  
  Pointed out by:	sam

Modified:
  head/etc/rc.d/rtadvd

Modified: head/etc/rc.d/rtadvd
==============================================================================
--- head/etc/rc.d/rtadvd	Sat Sep 12 22:22:31 2009	(r197145)
+++ head/etc/rc.d/rtadvd	Sat Sep 12 23:00:01 2009	(r197146)
@@ -9,6 +9,7 @@
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr
+. /etc/network.subr
 
 name="rtadvd"
 rcvar=`set_rcvar`
@@ -42,29 +43,9 @@ rtadvd_precmd()
 	case ${rtadvd_interfaces} in
 	[Aa][Uu][Tt][Oo]|'')
 		for i in `ifconfig -l` ; do
-			case $i in
-			lo0|\
-			stf[0-9]*|\
-			faith[0-9]*|\
-			lp[0-9]*|\
-			sl[0-9]*|\
-			pflog[0-9]*|\
-			pfsync[0-9]*|\
-			an[0-9]*|\
-			ath[0-9]*|\
-			ipw[0-9]*|\
-			iwi[0-9]*|\
-			iwn[0-9]*|\
-			ral[0-9]*|\
-			wi[0-9]*|\
-			wl[0-9]*|\
-			wpi[0-9]*)
-				continue
-				;;
-			*)
+			if is_wired_interface $1; then
 				rtadvd_interfaces="${rtadvd_interfaces} ${i}"
-				;;
-			esac
+			fi
 		done
 		;;
 	esac


More information about the svn-src-head mailing list