Package: nvidia-kernel-common
Version: 20050829+1
Severity: normal
Tags: patch

Kernel sysfs symbols are GPL only as of 2.6.13, thus udev never notices
the nvidia module.  

The attached script should be safe on non-udev systems too; if you've
installed this package, you probably want the devices created if they
don't already exist.

/etc/init.d/nvidia-kernel:
---------------------------------------------------------------------------
#!/bin/sh

PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin

# How many cards?
[ -r /etc/default/nvidia-kernel ] && . /etc/default/nvidia-kernel

# test if anything is requested
if [ -z "$NVIDIA_CARDS" ] || [ "$NVIDIA_CARDS" = 0 ]; then
  # Nothing to do but exit.
  exit 0
fi  

make_nodes () {
  if ! [ -e /dev/nvidiactl ]; then
    mknod -m 0660 /dev/nvidiactl c 195 255
    chgrp video /dev/nvidiactl
  fi
  for (( i=0; i < NVIDIA_CARDS && i < 4; i++ )); do
    if ! [ -e /dev/nvidia$i  ]; then
      mknod -m 0660 /dev/nvidia$i c 195 $i
      chgrp video /dev/nvidia$i
    fi
  done
}

case "$1" in
  start|restart|reload|force-reload)
    make_nodes
    ;;

  stop) 
    :
    ;;

  *)
    echo "Usage: /etc/init.d/nvidia-kernel 
{start|stop|restart|reload|force-reload}"
    exit 1
    ;;
esac
        
exit 0
---------------------------------------------------------------------------

/etc/default/nvidia-kernel:
---------------------------------------------------------------------------
# How many nVidia cards are in the system?

NVIDIA_CARDS=1
---------------------------------------------------------------------------

I did update-rc.d at 'defaults 19' to be ahead of nvidia-glx, but I
doubt the level matters as long as it's less than ?dm (99).

Rob

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13-btd2
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages nvidia-kernel-common depends on:
ii  module-init-tools             3.2-pre9-2 tools for managing Linux kernel mo
ii  modutils                      2.4.27.0-3 Linux module utilities

Versions of packages nvidia-kernel-common recommends:
ii  nvidia-kernel-source          1.0.7174-4 NVIDIA binary kernel module source

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to