From ea906053e7d02519f9b51881e349477471177d61 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 28 May 2011 04:38:15 +0000 Subject: [PATCH] turns out there is an unloading video driver module case, so adding that condition, for loaded, unloaded, and failed output --- inxi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index dcf2f1c..91e515d 100755 --- a/inxi +++ b/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