[arch-commits] Commit in hwdetect/trunk (hwdetect)

Tobias Powalowski tpowa at archlinux.org
Thu Aug 4 07:29:49 UTC 2011


    Date: Thursday, August 4, 2011 @ 03:29:49
  Author: tpowa
Revision: 134477

remove most --net code and just generate udev rules with it

Modified:
  hwdetect/trunk/hwdetect

----------+
 hwdetect |   32 +++-----------------------------
 1 file changed, 3 insertions(+), 29 deletions(-)

Modified: hwdetect
===================================================================
--- hwdetect	2011-08-04 07:20:01 UTC (rev 134476)
+++ hwdetect	2011-08-04 07:29:49 UTC (rev 134477)
@@ -52,8 +52,9 @@
 	echo "    --nfs                  add net to HOOKS="
 	echo "    --btrfs                add btrfs to HOOKS="
 	echo ""
+	echo "    --net                  generate /tmp/network_persistent.rules for udev use"
+	echo ""
 	echo "  For /etc/rc.conf use:"
-	echo "    --net                  show network MODULES"
 	echo "    --sound                show sound MODULES"
 	echo "    --modules              show all detected MODULES"
 	echo "    --modules-not-loaded   show all detected MODULES but not actually loaded"
@@ -487,34 +488,7 @@
 				MODULES_INITRAMFS="$FB $MODULES_INITRAMFS "
 				! [ "$HOOKS" = "1" ] && showlist2 "MODULES" \"$MODULES_INITRAMFS\" | sed -e 's/(\  /(/g' -e 's/"\ /"/g' -e 's/\ "/"/g' -e 's/\ \ /\ /g'
 				;;
-		--net)  if [ "$(showlist2 "MODULES"  \($(listmods drivers/net/ irda ppp_generic slhc) $(listmods drivers/usb/net/) $(listmods drivers/staging/) \) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g' | grep '8139cp')" ] ; then
-				if [ "$(dmesg | grep 'use 8139too')" ]; then
-					NET_EXPORTED="$(echo $(listmods drivers/net/ irda ppp_generic slhc) $(listmods drivers/usb/net/) $(listmods drivers/staging/) | sed -e 's/8139cp//g')"
-					MODULES_EXPORTED="$MODULES_EXPORTED $NET_EXPORTED"
-					BLACKLIST_UDEV="8139cp"
-					for i in $NET_EXPORTED; do
-						BLACKLIST_UDEV="$BLACKLIST_UDEV $i"
-					done
-					showlist2 "MODULES"  \($MODULES_EXPORTED\) | sed -e 's/(\  /(/g' -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
-				else
-					NET_EXPORTED="$(echo $(listmods drivers/net/ irda ppp_generic slhc) $(listmods drivers/usb/net/) $(listmods drivers/staging/) | sed -e 's/8139too//g')"
-					MODULES_EXPORTED="$MODULES_EXPORTED $NET_EXPORTED"
-					BLACKLIST_UDEV="8139too"
-					for i in $NET_EXPORTED; do
-						BLACKLIST_UDEV="$BLACKLIST_UDEV $i"
-					done
-					showlist2 "MODULES"  \($MODULES_EXPORTED\) | sed -e 's/(\  /(/g' -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
-				fi
-			else
-				NET_EXPORTED="$(listmods drivers/net/ irda ppp_generic slhc) $(listmods drivers/usb/net/) $(listmods drivers/staging/)"
-				MODULES_EXPORTED="$MODULES_EXPORTED $NET_EXPORTED" 
-				BLACKLIST_UDEV=""
-				for i in $NET_EXPORTED; do
-					BLACKLIST_UDEV="$BLACKLIST_UDEV $i"
-				done
-				showlist2 "MODULES"  \($MODULES_EXPORTED\) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
-			fi
-                        : >/tmp/network_persistent.rules
+		--net)  : >/tmp/network_persistent.rules
 			for i in $(ls /sys/class/net/ | grep -v ^lo); do
 			      echo "SUBSYSTEM==\"net\", ATTR{address}=\"$(cat /sys/class/net/${i}/adress)\", NAME=\"${i}\"" >>/tmp/network_persistent.rules
 			done




More information about the arch-commits mailing list