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

Tobias Powalowski tpowa at archlinux.org
Sun Mar 27 13:05:43 UTC 2011


    Date: Sunday, March 27, 2011 @ 09:05:42
  Author: tpowa
Revision: 117001

upgpkg: hwdetect 2011.03-1
added usb 3.0 module and added modules-not-loaded option

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

----------+
 PKGBUILD |    4 ++--
 hwdetect |   18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-03-27 12:26:46 UTC (rev 117000)
+++ PKGBUILD	2011-03-27 13:05:42 UTC (rev 117001)
@@ -1,7 +1,7 @@
 # $Id$
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 pkgname=hwdetect
-pkgver=2010.08
+pkgver=2011.03
 pkgrel=1
 pkgdesc="Hardware detection script with loading modules and mkinitcpio.conf / rc.conf support"
 arch=(any)
@@ -16,4 +16,4 @@
 build() {
   install -D -m 755 ${srcdir}/hwdetect ${pkgdir}/sbin/hwdetect
 }
-md5sums=('cece9e167bb240c82855ffc3f632a5bb')
+md5sums=('3310641a9b9dbc9b828e7608c4e263aa')

Modified: hwdetect
===================================================================
--- hwdetect	2011-03-27 12:26:46 UTC (rev 117000)
+++ hwdetect	2011-03-27 13:05:42 UTC (rev 117001)
@@ -1,6 +1,7 @@
 #! /bin/sh
 # Autodetection script for scanning /sys for hardware
 # for Archlinux by Tobias Powalowski <tpowa at archlinux.org>
+# '--modules-not-loaded' patch by Grzegorz Wierzowiecki <grzegorz.wierzowiecki_4t_pjwstk.edu.pl>
 usage () {
 	echo "$0 [options]"
 	echo ""
@@ -57,6 +58,7 @@
 	echo "    --sound                show sound MODULES"
 	echo "    --usbhost              show usb hostcontroller MODULES"
 	echo "    --modules              show all detected MODULES"
+	echo "    --modules-not-loaded   show all detected MODULES but not actually loaded"
 	echo ""
 	exit 1
 }
@@ -380,6 +382,20 @@
 	echo ""
 }
 
+showlist4() {
+	cat=$1 ; shift
+	[ $# -gt 0 ] || return
+	echo -n "$cat=(\${MODULES[*]} "
+	lsmod > /tmp/modules-showlist4-$$
+	for i in $*; do
+		if ! grep -sq $(echo $i|tr - _) /tmp/modules-showlist4-$$ ; then
+			echo -n "$i ";
+		fi
+	done
+	echo ")"
+	rm /tmp/modules-showlist4-$$
+}
+
 # starting different actions
 while [ $# -gt 0 ]; do
 	case $1 in
@@ -527,6 +543,8 @@
 			 ;;
 		--modules) showlist2 "MODULES" \($(listmods modules/)\) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
 			 ;;
+		--modules-not-loaded) showlist4 "MODULES" $(listmods modules/) | sed -e 's/(\ /(/g' -e 's/\ )/)/g' -e 's/\ \ /\ /g'
+			 ;;
 		--hooks) 
 			if [ "$HOOKS_DIR" = "" ]; then
 				HOOKS_DIR="/lib/initcpio/install"




More information about the arch-commits mailing list