[Midnightbsd-cvs] src: pccard_ether: Sync changes

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Dec 6 23:47:32 EST 2008


Log Message:
-----------
Sync changes

Modified Files:
--------------
    src/etc:
        pccard_ether (r1.2 -> r1.3)

-------------- next part --------------
Index: pccard_ether
===================================================================
RCS file: /home/cvs/src/etc/pccard_ether,v
retrieving revision 1.2
retrieving revision 1.3
diff -L etc/pccard_ether -L etc/pccard_ether -u -r1.2 -r1.3
--- etc/pccard_ether
+++ etc/pccard_ether
@@ -68,11 +68,15 @@
 
 pccard_ether_start()
 {
-	if [ -z "$rc_force" -a -x /usr/bin/grep ]; then
-		if ifconfig $ifn | grep -s '[<,]UP[,>]' > /dev/null 2>&1; then
-		    # Interface is already up, so ignore it.
-		    exit 0
-		fi
+	ifexists $ifn || exit 1
+
+	if [ -z "$rc_force" ]; then
+		for uif in `ifconfig -ul`; do
+			if [ "${uif}" = "${ifn}" ]; then
+				# Interface is already up, so ignore it.
+				exit 0
+			fi
+		done
 	fi
 
 	/etc/rc.d/netif start $ifn
@@ -85,10 +89,7 @@
 		fi
 	fi
 
-	# IPv6 setup
-	if checkyesno ipv6_enable; then
-		network6_interface_setup $ifn
-	fi
+	# XXX: IPv6 setup should be done in some way.
 }
 
 pccard_ether_stop()
@@ -102,12 +103,7 @@
 	/etc/rc.d/netif stop $ifn
 
 	# clean ARP table
-	arp -d -a
-
-	# Clean the routing table
-	if checkyesno removable_route_flush; then
-		route -n flush -inet > /dev/null
-	fi
+	ifexists $ifn && arp -d -i $ifn -a
 }
 
 pccard_ether_restart()


More information about the Midnightbsd-cvs mailing list