Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=ef8a5eb36b8cd65be8e66748ff200515edc5b131

commit ef8a5eb36b8cd65be8e66748ff200515edc5b131
Author: Michel Hermier <[EMAIL PROTECTED]>
Date:   Thu Feb 28 20:24:37 2008 +0100

nvidia-96xx-96.43.05-4-i686
* Backport changes from nvidia package.

diff --git a/source/x11-extra/nvidia-96xx/FrugalBuild 
b/source/x11-extra/nvidia-96xx/FrugalBuild
index f357fb3..f797b76 100644
--- a/source/x11-extra/nvidia-96xx/FrugalBuild
+++ b/source/x11-extra/nvidia-96xx/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=nvidia-96xx
pkgver=96.43.05
-pkgrel=3
+pkgrel=4
pkgdesc="3d accelerated display driver for Nvidia cards"
url="http://www.nvidia.com/object/linux_display_archive.html";
conflicts=('libgl' 'libglx' 'nvidia')
diff --git a/source/x11-extra/nvidia-96xx/nvidia-96xx.install 
b/source/x11-extra/nvidia-96xx/nvidia-96xx.install
index 8796cd6..d346d07 100644
--- a/source/x11-extra/nvidia-96xx/nvidia-96xx.install
+++ b/source/x11-extra/nvidia-96xx/nvidia-96xx.install
@@ -27,17 +27,35 @@ post_install() {
if [ "$exist" -eq 0 ]; then
echo nvidia >> /etc/sysconfig/modules
fi
-       /sbin/depmod -a $_F_kernelmod_uname
-       /sbin/modprobe nvidia
+       /sbin/depmod -ea $_F_kernelmod_uname
+       ## if nvidia dependent kernel is the current kernel
+       if [ -e /lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko ]; then
+               ## Try to load it
+               /sbin/modprobe nvidia
+       fi
}

post_upgrade() {
-       post_install $1
+       echo -n "Runing depmod for nvidia kernel module for kernel 
$_F_kernelmod_uname ..."
+       /sbin/depmod -ea $_F_kernelmod_uname
+       echo " done."
+        ## if that exisit we bumped / upgraded the package only no new kernel
+       ## on a new kernel we do nothing because one has to reboot anyway
+       if [ -e /lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko ]; then
+               ## see if is loaded , if yes kill it and modprobe again if not 
do nothing
+               if grep -q nvidia /proc/modules; then
+                       echo -n "Reloading nvidia kernel module.."
+                               modprobe --remove nvidia
+                               sleep 1
+                               modprobe nvidia
+                       echo " done."
+               fi
+       fi
}

pre_remove() {
if test `lsmod | grep ^nvidia | wc -l` -gt 0; then
-               /sbin/rmmod nvidia
+               /sbin/modprobe --remove nvidia
fi

if [ -e /etc/X11/xorg.conf ]; then
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to