mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 08:35:25 +00:00
fixed up, made consistent and maybe more reliable
This commit is contained in:
parent
5e093d108c
commit
a3494fb58a
8
inxi
8
inxi
|
@ -3224,15 +3224,13 @@ get_graphics_driver()
|
||||||
xorg_log_data="$( cat $FILE_XORG_LOG )"
|
xorg_log_data="$( cat $FILE_XORG_LOG )"
|
||||||
for driver in $driver_list
|
for driver in $driver_list
|
||||||
do
|
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 [[ -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'
|
status='loaded'
|
||||||
else
|
else
|
||||||
if [[ -n $( grep -si "Failed[[:space:]]to[[:space:]]load[[:space:]].*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
|
|
||||||
status='failed'
|
status='failed'
|
||||||
else
|
|
||||||
status='unloaded'
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
driver_string="$driver_string$driver->$status$spacer"
|
driver_string="$driver_string$driver->$status$spacer"
|
||||||
spacer=' '
|
spacer=' '
|
||||||
|
|
Loading…
Reference in a new issue