#!/bin/bash vdir=`dirname $0` . $vdir/vasm-functions check_root if [ $DISPLAY ]; then DIALOG=Xdialog else DIALOG=dialog fi kernel=`uname -r` drivers="`ls /usr/src/vl-pkgs/fglrx*$kernel*tlz 2>/dev/null`" j="0" for i in $drivers; do driv[$j]="$i" j=`expr $j + 1` done $DIALOG --title "ATI Driver Selection" --menu \ " The system has detected an ATI Video Card. The system defaults to the standard (ati) driver which is generic and OpenSource. The OpenSource Drivers provide limited 3D capabilities. The FGLRX Driver from ATI is proprietary and supplies full 3D capabilities. If you DO NOT get to a desktop, please reboot and use another selection!!\n Please Select the Driver you would like to use!" 20 71 4\ "FGLRX" "This is the Proprietary fglrx driver" \ "FGLRX-OLD" "This is the Proprietary driver for Older ATI Cards" \ "radeon" "This is the OpenSource radeon driver" \ "ati" "This is the OpenSource ati driver" \ 2> $freply result=$? if [ $result != 0 ];then exit 0 fi DRIVER="`cat $freply`" #echo $DRIVER case "$DRIVER" in "ati") #cat /etc/X11/xorg.conf.ati > $HOME/xorg.conf.new exit 23 ;; "radeon") sed s'/\"ati\"/\"radeon\"/'g /etc/X11/xorg.conf > /etc/X11/xorg.conf.new && \ mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf exit 0 ;; "FGLRX-OLD") /usr/src/vl-pkgs/ati-driver-installer-8.30.3.run --install sed s'/\"ati\"/\"fglrx\"/'g /etc/X11/xorg.conf > /etc/X11/xorg.conf.new && \ mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf sed s'/\"vesa\"/\"fglrx\"/'g /etc/X11/xorg.conf > /etc/X11/xorg.conf.new && \ mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf exit 0 ;; "FGLRX") /usr/src/vl-pkgs/ati-driver-installer-8.36.5-x86.x86_64.run --install result=$? if [ $result = 0 ];then sed s'/\"ati\"/\"fglrx\"/'g /etc/X11/xorg.conf > /etc/X11/xorg.conf.new && \ mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf sed s'/\"vesa\"/\"fglrx\"/'g /etc/X11/xorg.conf > /etc/X11/xorg.conf.new && \ mv /etc/X11/xorg.conf.new /etc/X11/xorg.conf exit 0 fi exit 1 ;; esac fi