On 10/31/05, Mogens Kjaer <mk@xxxxxx> wrote: > micheal wrote: > ... > > I may be daft, but for my ATI card, whenever I update my kernel from > > updates released it defautls to use the radeon driver. I just update the > > kernel-module from livna manually. > > > > I don't see why this would not work for nVidia. > > It does, it's just not what I want. > > I want a delayed installation of the kernel until > the graphics module is available. > > My users can't use their machine for anything unless > the 3D driver is loaded. They can't manually install > the graphics driver. > > Anyway, I've added a /etc/init.d script that checks if > the nvidia kernel module exists. > > If it doesn't, it reinstalls the nvidia driver. > > I've put the driver on an NFS share, with a symlink > at /server1/nvidia/latest.x86. The script is shown below. By the way, the -k and -K options to the nvidia installer (one takes the kernel version as an argument, but I can never remember which) can be used to only install the kernel module, which will not uninstall it for previous kernels. Which means should you need to boot an older kernel, it will work just fine without the script running again and clobbering the install for the latest kernel. Should also be a little faster. Also, is there a command that will tell you if a kernel module exists without having to look in a specific location? (maybe modinfo?) Might be better if for some strange reason the kernel module gets moved. Just some thoughts. Jonathan > Mogens > > > #!/bin/sh > # > # nvidia: Install nvidia driver if module doesn't exist. > # > # chkconfig: 5 90 10 > # description: Install nvidia driver if module doesn't exist. > # > # > > # Source function library. > > . /etc/rc.d/init.d/functions > > start() { > if [ -f /lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko ]; then > echo 'Nvidia module already exists.' > else > echo 'Nvidia module does not exist; reinstalling nvidia driver. > This will take a few minutes.' > if [ -f /server1/nvidia/latest.x86 ]; then > cp /server1/nvidia/latest.x86 /tmp > sh /tmp/latest.x86 -s --update --force-update > echo 'A warning from the installer about something being altered > can be ignored.' > else > echo '/server1/nvidia/latest.x86 does not exist' > fi > fi > > } > > stop() { > true > } > > # See how we were called. > case "$1" in > start) > start > ;; > stop) > stop > ;; > restart|reload) > stop > start > ;; > condrestart) > ;; > *) > echo $"Usage: $0 {start|stop|restart|reload|condrestart}" > exit 1 > esac > > exit 0 >