mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(Change version)
Found another issue, for snd modules, we have to use array item 3, kernel modules loaded, not driver driver for sound modules is a name, not a module name, and also the reported modules need further processing, - to _ and tolower in case.
This commit is contained in:
parent
c0d50a4a26
commit
c90ed16e7b
17
inxi
17
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.3.11
|
#### version: 1.3.12
|
||||||
#### Date: February 5 2010
|
#### Date: February 5 2010
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -4030,7 +4030,11 @@ print_audio_data()
|
||||||
# port_data=" ${C1}at port${C2} ${a_audio_working[2]}"
|
# port_data=" ${C1}at port${C2} ${a_audio_working[2]}"
|
||||||
# fi
|
# fi
|
||||||
# this should only trigger if the $FILE_ASOUND_DEVICE data is used, not lspci -nn
|
# this should only trigger if the $FILE_ASOUND_DEVICE data is used, not lspci -nn
|
||||||
if [[ -n ${a_audio_working[1]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[3]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
|
# note that for some reason, the module name is not the same as the module
|
||||||
|
# loaded to kernel name for audio drivers, and you'll need to change the -
|
||||||
|
module_version=$( print_module_version "${a_audio_working[3]}" 'audio' )
|
||||||
|
elif [[ -n ${a_audio_working[1]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
module_version=$( print_module_version "${a_audio_working[1]}" 'audio' )
|
module_version=$( print_module_version "${a_audio_working[1]}" 'audio' )
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_audio_working[1]} ]];then
|
if [[ -n ${a_audio_working[1]} ]];then
|
||||||
|
@ -4060,7 +4064,9 @@ print_audio_data()
|
||||||
module_version=''
|
module_version=''
|
||||||
pci_bus_id=''
|
pci_bus_id=''
|
||||||
if [[ -n ${a_audio_working[3]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_audio_working[3]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
module_version=$( print_module_version "${a_audio_working[3]}" )
|
module_version=$( print_module_version "${a_audio_working[3]}" 'audio' )
|
||||||
|
elif [[ -n ${a_audio_working[1]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
|
module_version=$( print_module_version "${a_audio_working[1]}" 'audio' )
|
||||||
fi
|
fi
|
||||||
# we're testing for the presence of the 2nd array item here, which is the driver name
|
# we're testing for the presence of the 2nd array item here, which is the driver name
|
||||||
if [[ -n ${a_audio_working[1]} ]];then
|
if [[ -n ${a_audio_working[1]} ]];then
|
||||||
|
@ -4427,8 +4433,11 @@ print_module_version()
|
||||||
|
|
||||||
# note that sound driver data tends to have upper case, but modules are lower
|
# note that sound driver data tends to have upper case, but modules are lower
|
||||||
if [[ $2 == 'audio' ]];then
|
if [[ $2 == 'audio' ]];then
|
||||||
prefix='snd_' # sound modules start with snd_
|
if [[ -z $( grep -E '^snd' <<< $modules ) ]];then
|
||||||
|
prefix='snd_' # sound modules start with snd_
|
||||||
|
fi
|
||||||
modules=$( tr '[A-Z]' '[a-z]' <<< $modules )
|
modules=$( tr '[A-Z]' '[a-z]' <<< $modules )
|
||||||
|
modules=$( tr '-' '_' <<< $modules )
|
||||||
# special intel processing, generally no version info though
|
# special intel processing, generally no version info though
|
||||||
if [[ $modules == 'hda intel' ]];then
|
if [[ $modules == 'hda intel' ]];then
|
||||||
modules='hda_intel'
|
modules='hda_intel'
|
||||||
|
|
Loading…
Reference in a new issue