From a3494fb58affffebe9fa91b174088c288b32f145 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 25 May 2011 01:03:29 +0000 Subject: [PATCH] fixed up, made consistent and maybe more reliable --- inxi | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index 73451e7..21c775d 100755 --- a/inxi +++ b/inxi @@ -3224,15 +3224,13 @@ get_graphics_driver() xorg_log_data="$( cat $FILE_XORG_LOG )" for driver in $driver_list do + # 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 "[[:space:]]Unload.*${driver}" <<< "$xorg_log_data" ) ]];then + if [[ -z $( grep -si "Failed.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then status='loaded' else - if [[ -n $( grep -si "Failed[[:space:]]to[[:space:]]load[[:space:]].*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then - status='failed' - else - status='unloaded' - fi + status='failed' fi driver_string="$driver_string$driver->$status$spacer" spacer=' '