Changelog: 1) Show if the script was run as root, or as a user. 2) Check the group permissions of the ALSA device nodes, and check to see if the user is in that group, and display a warning if they are not. 3) Bumped version to 0.4.52 Signed-off-by: Travis Place <wishie@xxxxxxxxxx> Notes: Im sure this code is far from perfect, and welcome any changes to it.
--- alsa-info.sh 2008-08-23 02:30:27.000000000 +1000 +++ alsa-info.sh.latest 2008-08-23 02:30:38.000000000 +1000 @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION=0.4.51 +SCRIPT_VERSION=0.4.52 CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" ################################################################################# @@ -138,6 +138,12 @@ echo "!!-----------------" >> $FILE echo "" >> $FILE ls -la /dev/snd/* >> $FILE + if [[ $USER != "root" ]];then + echo "" >> $FILE + for groups in `ls -la /dev/snd/*|awk {'print $4'}`; do + groups $USER|grep $groups >/dev/null || echo "User not in group $groups!" >> $FILE; + done + fi echo "" >> $FILE echo "" >> $FILE } @@ -312,6 +318,7 @@ echo "!!################################" >> $FILE echo "" >> $FILE echo "!!Script ran on: `LANG=C date`" >> $FILE +echo "!!Script ran as: `if [ $USER == "root" ];then echo 'Root'; else echo 'A User';fi`" >> $FILE echo "" >> $FILE echo "" >> $FILE echo "!!Linux Distribution" >> $FILE
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel