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:
inxi-svn 2011-05-28 04:38:15 +00:00
parent f8463034fd
commit ea906053e7

8
inxi
View file

@ -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