[alsa-devel] [PATCH] alsa-info.sh: Provide system manufacturer and product name from DMI
Ozan Çağlayan
ozan at pardus.org.tr
Mon Jun 1 13:25:41 CEST 2009
This commit adds system manufacturer and product name informations
acquired using dmidecode to the output of the alsa-info script.
Note that those informations will only be available when dmidecode
utility is installed and alsa-info is run with root privileges.
Signed-off-by: Ozan Çağlayan <ozan at pardus.org.tr>
---
utils/alsa-info.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/utils/alsa-info.sh b/utils/alsa-info.sh
index f1660f8..4be4e05 100755
--- a/utils/alsa-info.sh
+++ b/utils/alsa-info.sh
@@ -400,6 +400,12 @@ ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
PAINST=$(which pulseaudio 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+DMIDECODE=$(which dmidecode 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+
+if [ -x $DMIDECODE ]; then
+ DMI_SYSTEM_MANUFACTURER=$($DMIDECODE -s system-manufacturer 2>/dev/null)
+ DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name 2>/dev/null)
+fi
cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp
cat /proc/asound/cards >$TEMPDIR/alsacards.tmp
@@ -431,6 +437,13 @@ echo "" >> $FILE
echo $DISTRO >> $FILE
echo "" >> $FILE
echo "" >> $FILE
+echo "!!DMI Information" >> $FILE
+echo "!!---------------" >> $FILE
+echo "" >> $FILE
+echo "Manufacturer: $DMI_SYSTEM_MANUFACTURER" >> $FILE
+echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE
+echo "" >> $FILE
+echo "" >> $FILE
echo "!!Kernel Information" >> $FILE
echo "!!------------------" >> $FILE
echo "" >> $FILE
--
1.6.3
More information about the Alsa-devel
mailing list