[alsa-devel] patch for alsa-info.sh to quote [ -d $SYSFS ]

Luis Yanes melus0 at teleline.es
Sat Oct 25 14:38:03 CEST 2008


Found a couple of bugs in http://www.alsa-project.org/alsa-info.sh
while running it in my system.

* old uname <= 2.0.11 doesn't accept -o argument
* $SYSFS is not quoted while checking if directory exist and fails if
empty

Attached is a small patch for the first of them, but think that all
variables also should be quoted to avoid future problems.

Regards.
-------------- next part --------------
--- alsa-info.sh.orig	Sat Oct 25 14:16:43 2008
+++ alsa-info.sh	Sat Oct 25 14:18:44 2008
@@ -373,7 +373,7 @@
 echo "" >> $FILE
 fi
 
-if [ -d $SYSFS ]
+if [ -d "$SYSFS" ]
 then
 echo "!!Loaded sound module options" >> $FILE
 echo "!!--------------------------" >> $FILE


More information about the Alsa-devel mailing list