(Change Version)

Added fail option for sound card test, also check /proc/asound/cards for something too
This commit is contained in:
inxi-svn 2008-11-11 05:58:15 +00:00
parent 17031b8f10
commit 881628d7f0

11
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 0.5.7 #### version: 0.5.8
#### Date: November 10 2008 #### Date: November 10 2008
######################################################################## ########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif #### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -886,6 +886,15 @@ get_audio_data()
gsub(/ [ \t]+/," ",$NF) gsub(/ [ \t]+/," ",$NF)
print $NF print $NF
}' ) ) }' ) )
# c=gensub( /^ *vendor: (.+) +model: (.+) +rev:.*$/, "\\2", "g", a[i] )
# in case of failure of first check do this instead
if [[ ${#A_AUDIO_DATA[@]} -eq 0 && -f /proc/asound/cards ]];then
A_AUDIO_DATA=( $( gawk -F ']: ' '{
card=gensub( /^(.+)( - )(.+)$/, "\\3", 1, $2 )
print card
}' /proc/asound/cards ) )
fi
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
# handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes.. # handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..