Bug fix applied to branch one as well

This commit is contained in:
inxi-svn 2008-11-14 09:21:11 +00:00
parent 3397457c45
commit d7839c49e1

11
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.5.30-b-1-t-1
#### version: 0.5.31-b-1-t-1
#### Date: November 13 2008
########################################################################
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
@ -994,9 +994,12 @@ get_audio_data()
IFS=$'\n'
# this is awkward, but it should work, ie, if there's only one sound card found
# have to filter out modems because they also appear on asound/cards
device_count=$( egrep -ic '(multimedia audio controller|audio device)' <<< "$lspci_data" )
if [[ $device_count -eq 1 && -f /proc/asound/cards ]];then
alsa_driver=$( gawk -F ']: ' '{
alsa_driver=$( gawk -F ']: ' '
{ IGNORECASE=1 }
$1 !~ /modem/ && $2 !~ /modem/ {
driver=gensub( /^(.+)( - )(.+)$/, "\\1", 1, $2 )
gsub(/^ +| +$/,"",driver)
if ( driver != "" ){
@ -1023,7 +1026,9 @@ get_audio_data()
# 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 ']: ' '{
A_AUDIO_DATA=( $( gawk -F ']: ' '
{ IGNORECASE=1 }
$1 !~ /modem/ && $2 !~ /modem/ {
card=gensub( /^(.+)( - )(.+)$/, "\\3", 1, $2 )
driver=gensub( /^(.+)( - )(.+)$/, "\\1", 1, $2 )
if ( card != "" ){