[PATCH] alsa-info: Use pgrep with -f for matching against the process' cmdline.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Latest alsa-info.sh has a sound daemon detection snippet which uses pgrep to findout if any sound daemon is loaded or not. The full paths to the binaries aregiven to pgrep but pgrep matches its first parameter against the "process name"by default.
Call pgrep with -f to match against the process' command line to fix the detectioncode.
Signed-off-by: Ozan Çağlayan <ozan@xxxxxxxxxxxxx>--- utils/alsa-info.sh |    6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/alsa-info.sh b/utils/alsa-info.shindex 1be147f..be10362 100755--- a/utils/alsa-info.sh+++ b/utils/alsa-info.sh@@ -375,21 +375,21 @@ echo "!!Sound Servers on this system" >> $FILE echo "!!----------------------------" >> $FILE echo "" >> $FILE if [[ -n $PAINST ]];then-[[ `pgrep $PAINST` ]] && PARUNNING="Yes" || PARUNNING="No"+[[ `pgrep -f $PAINST` ]] && PARUNNING="Yes" || PARUNNING="No" echo "Pulseaudio:" >> $FILE echo "      Installed - Yes ($PAINST)" >> $FILE echo "      Running - $PARUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $ESDINST ]];then-[[ `pgrep $ESDINST` ]] && ESDRUNNING="Yes" || ESDRUNNING="No"+[[ `pgrep -f $ESDINST` ]] && ESDRUNNING="Yes" || ESDRUNNING="No" echo "ESound Daemon:" >> $FILE echo "      Installed - Yes ($ESDINST)" >> $FILE echo "      Running - $ESDRUNNING" >> $FILE echo "" >> $FILE fi if [[ -n $ARTSINST ]];then-[[ `pgrep $ARTSINST` ]] && ARTSRUNNING="Yes" || ARTSRUNNING="No"+[[ `pgrep -f $ARTSINST` ]] && ARTSRUNNING="Yes" || ARTSRUNNING="No" echo "aRts:" >> $FILE echo "      Installed - Yes ($ARTSINST)" >> $FILE echo "      Running - $ARTSRUNNING" >> $FILE-- 1.6.1
_______________________________________________Alsa-devel mailing listAlsa-devel@xxxxxxxxxxxxxxxxxxxx://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux