diff --git a/inxi b/inxi index d1dca5a..89d0f31 100755 --- a/inxi +++ b/inxi @@ -3196,18 +3196,20 @@ get_graphics_driver() eval $LOGFS local driver_list='apm ark ati chips cirrus cyrix fbdev fglrx glint i128 i740 intel i810 imstt mach64 mga neomagic nsc nv nvidia openchrome nouveau radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng unichrome vesa vga via voodoo vmware v4l' - local driver='' driver_string='' spacer='' + local driver='' driver_string='' spacer='' xorg_log_data='' if [[ $B_XORG_LOG == 'true' ]];then - for driver in $driver_list - do - if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" $FILE_XORG_LOG ) && -z $( grep -s "[[:space:]]Unloading.*${driver}_drv.so" $FILE_XORG_LOG ) ]];then - driver_string="$driver_string$driver$spacer" - spacer=' ' - fi - done + xorg_log_data="$( cat $FILE_XORG_LOG )" + for driver in $driver_list + do + if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) && -z $( grep -s "[[:space:]]Unloading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then + driver_string="$driver_string$driver$spacer" + spacer=' ' + fi + done + xorg_log_data='' # dump from ram, does it matter? fi - + echo $driver_string eval $LOGFE }