mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
turns out there is an unloading video driver module case, so adding that condition, for loaded, unloaded, and failed output
This commit is contained in:
parent
f8463034fd
commit
ea906053e7
8
inxi
8
inxi
|
@ -3205,10 +3205,12 @@ get_graphics_driver()
|
|||
# note there appears to be different unload/failed syntax, so using simple conservative one
|
||||
# I was not able to find a case where xorg.log shows unload and not fail
|
||||
if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
if [[ -z $( grep -si "Failed.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
||||
status='loaded'
|
||||
else
|
||||
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
|
||||
status='unloaded'
|
||||
else
|
||||
status='loaded'
|
||||
fi
|
||||
driver_string="$driver,$status"
|
||||
echo $driver_string
|
||||
|
|
Loading…
Reference in a new issue