slitaz-tools rev 925
tazx: autoselect_driver(): now auto-selects and auto-installs Xorg driver.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 15 06:45:42 2014 +0200 (2014-11-15) |
parents | b7dc6b11bcd7 |
children | eb791cfb71c0 |
files | tinyutils/tazx |
line diff
1.1 --- a/tinyutils/tazx Sat Nov 15 05:37:54 2014 +0200 1.2 +++ b/tinyutils/tazx Sat Nov 15 06:45:42 2014 +0200 1.3 @@ -161,15 +161,19 @@ 1.4 # Set selected value. 1.5 case $value in 1.6 quit) exit 0 ;; 1.7 + Auto_select) autoselect_driver ;; 1.8 *) 1.9 - [ ! $value = Auto_select ] || autoselect_driver IN_List 1.10 inst_pkg xorg-server 1.11 inst_pkg xorg-xf86-video-$value 1.12 xorg_conf_d ;; 1.13 esac 1.14 } 1.15 1.16 + 1.17 +# Auto-select and install Xorg driver 1.18 autoselect_driver() { 1.19 + inst_pkg xorg-server 1.20 + 1.21 DEVICE="$(_ 'driver')" 1.22 for VID in $(busybox lspci | grep 'Class 03' | cut -c21-24 | sort -u); do 1.23 case $VID in 1.24 @@ -178,11 +182,13 @@ 1.25 10de) d=nouveau ;; 1.26 1039) d=sis ;; 1.27 15ad) d=vmware ;; 1.28 - *) $DIALOG --colors --msgbox \ 1.29 + *) d=''; $DIALOG --colors --msgbox \ 1.30 "\Z1 $(_n 'Failed to setup $DEVICE') \Zn (unknown hardware)" 5 68 ;; 1.31 esac 1.32 - [ $1 = sh ] || install_xorg $d 1.33 + [ -n "$d" ] && inst_pkg xorg-xf86-video-$d 1.34 done 1.35 + 1.36 + xorg_conf_d 1.37 } 1.38 1.39 inst_pkg() { 1.40 @@ -356,9 +362,7 @@ 1.41 slitaz_apps_conf 1.42 gen_applist $2 $3 $4 ;; 1.43 auto) 1.44 - autoselect_driver sh 1.45 - inst_pkg xorg-server 1.46 - inst_pkg xorg-xf86-video-${d} ;; 1.47 + autoselect_driver ;; 1.48 bpp) 1.49 check_root 1.50 xorg_conf_d