mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed weak point on unloading driver logic, it can be several strings to test
This commit is contained in:
parent
eb9db620ba
commit
6eacbd3e13
4
inxi
4
inxi
|
@ -284,6 +284,7 @@ B_SCSI_FILE='false'
|
|||
|
||||
### File's used when present
|
||||
FILE_ASOUND_DEVICE='/proc/asound/cards'
|
||||
FILE_ASOUND_MODULES='/proc/asound/modules' # not used but maybe for -A?
|
||||
FILE_ASOUND_VERSION='/proc/asound/version'
|
||||
FILE_CPUINFO='/proc/cpuinfo'
|
||||
FILE_LSB_RELEASE='/etc/lsb-release'
|
||||
|
@ -3206,7 +3207,8 @@ get_graphics_driver()
|
|||
if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
if [[ -n $( grep -si "Failed.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
status='failed'
|
||||
elif [[ -n $( grep -si "Unloading[[:space:]]${driver}$" <<< "$xorg_log_data" ) ]];then
|
||||
# can be Unloading driver OR Unloading /usr/lib/xorg/modules/drivers/driver_drv.so
|
||||
elif [[ -n $( grep -Esi "Unloading[[:space:]](${driver}|.*${driver}_drv.so)$" <<< "$xorg_log_data" ) ]];then
|
||||
status='unloaded'
|
||||
else
|
||||
status='loaded'
|
||||
|
|
Loading…
Reference in a new issue