#!/bin/bash # # gonX@overclocked.net # # This script does the following: # # Updates vbox drivers (unless xc is specified or if vboxdrv.ko already exists for currently running kernel) # Updates graphics driver for nVidia (unless xc is specified) # Updates X config # Start X (unless no or xc is specified) # # I've put this script in /etc/rc.local # _nvVersion="256.53" _nvPath="/root/!kernelbuild" if [ ! "$1" = "xc" ]; then if [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then echo "Building VirtualBox modules. See /tmp/vbox_build_module.out for output" /etc/rc.d/vboxdrv setup > /tmp/vbox_build_module.out 2>&1 && modprobe vboxdrv & fi echo "Building nVidia proprietary drivers." $_nvPath/NVIDIA-Linux-`uname -m`-$_nvVersion/nvidia-installer -b -N -s --no-x-check fi echo "Running nvidia-xconfig to update X.Org configuration file" nvidia-xconfig --damage-events --composite --cool-bits=1 --sli=Off --add-argb-glx-visuals if [ "$1" = "xc" ]; then /bin/true elif [ "$1" = "no" ]; then /bin/true else # su - root -c '/bin/bash --login -c startx' & /bin/true fi