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

Tobias Powalowski tpowa at archlinux.org
Sun Aug 7 21:23:20 UTC 2011


    Date: Sunday, August 7, 2011 @ 17:23:19
  Author: tpowa
Revision: 134845

upgpkg: hwdetect 2011.08-1
major cleanup in persistent sound and network code

Modified:
  hwdetect/trunk/PKGBUILD
  hwdetect/trunk/hwdetect

----------+
 PKGBUILD |    5 +++--
 hwdetect |   27 ++++++++-------------------
 2 files changed, 11 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-08-07 20:46:48 UTC (rev 134844)
+++ PKGBUILD	2011-08-07 21:23:19 UTC (rev 134845)
@@ -1,7 +1,7 @@
 # $Id$
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 pkgname=hwdetect
-pkgver=2011.06
+pkgver=2011.08
 pkgrel=1
 pkgdesc="Hardware detection script with loading modules and mkinitcpio.conf / rc.conf support"
 arch=(any)
@@ -16,4 +16,5 @@
 build() {
   install -D -m 755 ${srcdir}/hwdetect ${pkgdir}/sbin/hwdetect
 }
-md5sums=('6ed80288fe8a76ae1827a552d40a6e8a')
+
+md5sums=('afd06601a67896f49339456ec05a0d3c')

Modified: hwdetect
===================================================================
--- hwdetect	2011-08-07 20:46:48 UTC (rev 134844)
+++ hwdetect	2011-08-07 21:23:19 UTC (rev 134845)
@@ -52,13 +52,12 @@
 	echo "    --nfs                  add net to HOOKS="
 	echo "    --btrfs                add btrfs to HOOKS="
 	echo ""
-	echo "    --net                  generate /tmp/network_persistent.rules for udev use"
+	echo "  For persistent sound and network files use:"
+	echo "    --net                  generate /tmp/network_persistent.rules"
+	echo "    --sound                generate /tmp/sound_persistent.conf"
 	echo ""
-	echo "  For /etc/rc.conf use:"
-	echo "    --sound                show sound MODULES"
 	echo "    --modules              show all detected MODULES"
 	echo "    --modules-not-loaded   show all detected MODULES but not actually loaded"
-	echo "    --blacklist            activates blacklisting for net and sound"
 	echo ""
 	exit 1
 }
@@ -114,9 +113,6 @@
 # hooks switch
 [ "$(echo $* | grep '\-hooks')" ] && HOOKS=1
 
-# blacklist switch
-[ "$(echo $* | grep '\-blacklist')" ] && BLACKLIST=1
-
 ADVANCED=""
 # root device check
 if ! [ "$ROOTDEVICE" = "" ]; then
@@ -494,19 +490,12 @@
 			done
 
 			;;
-		--sound) SOUND_EXPORTED="$(listmods pcspkr) $(listmods sound/)"
-			 MODULES_EXPORTED="$MODULES_EXPORTED $SOUND_EXPORTED"
-			 BLACKLIST_UDEV=""
-			 for i in $SOUND_EXPORTED; do
-				BLACKLIST_UDEV="$BLACKLIST_UDEV $i"
+		--sound) : >/tmp/sound_persistent.conf
+			 SOUND_EXPORTED=""
+			 for i in $(cat /proc/asound/modules | cut -d ' ' -f 3); do
+				SOUND_EXPORTED="$SOUND_EXPORTED $i"
 			 done
-			 showlist2 "MODULES" \($MODULES_EXPORTED\) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
-                         : >/tmp/blacklist_sound.conf
-			 if [ "$BLACKLIST" = "1" ]; then	
-			 	for i in $BLACKLIST_UDEV; do
-			 		echo "blacklist $i" >> /tmp/blacklist_sound.conf
-			 	done
-                         fi
+			 ! [[ "$SOUND_EXPORTED" = "" ]] && echo "options snd slots=$(echo $SOUND_EXPORTED | sed -e 's# #,#g' -e 's#^,##g')" >> /tmp/sound_persistent.conf
 			 ;;
 		--modules) showlist2 "MODULES" \($(listmods modules/)\) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
 			 ;;




More information about the arch-commits mailing list