mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
(Change Version)
Added fail option for sound card test, also check /proc/asound/cards for something too
This commit is contained in:
parent
17031b8f10
commit
881628d7f0
11
inxi
11
inxi
|
@ -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..
|
||||||
|
|
Loading…
Reference in a new issue