diff --git a/data/calculate b/data/calculate index 0f9bcca..0962226 100755 --- a/data/calculate +++ b/data/calculate @@ -8,7 +8,11 @@ depend() { xorg_video_driver() { - cat /etc/X11/xorg.conf | grep Driver | cut -d\" -f2 + local xorgFile="/etc/X11/xorg.conf" + if [[ -f $xorgFile ]] + then + cat /etc/X11/xorg.conf | grep Driver | cut -d\" -f2 + fi } cmdline_video_driver() @@ -19,7 +23,7 @@ cmdline_video_driver() case $x in calculate\=*) local value=`echo "$x" | cut -d\= -f2-` - local videodrv=`echo "$value" | cut -d, -f4` + local videodrv=`echo "$value" | cut -d, -f5` if [[ -n $videodrv ]] then echo "$videodrv"