if /sbin/modprobe --ignore-install nvidia NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=$(getent group video | cut -d: -f3) NVreg_DeviceFileMode=0660 NVreg_PreserveVideoMemoryAllocations=1; then
mknod -m 660 /dev/nvidia-uvm c $(cat /proc/devices | while read major device; do if [ "$device" == "nvidia-uvm" ]; then echo $major; break; fi ; done) 0;
chown :video /dev/nvidia-uvm;
fi;
if [ ! -c /dev/nvidia-uvm-tools ]; then
mknod -m 660 /dev/nvidia-uvm-tools c $(cat /proc/devices | while read major device; do if [ "$device" == "nvidia-uvm" ]; then echo $major; break; fi ; done) 1;
chown :video /dev/nvidia-uvm-tools;
fi;
fi;
if [ ! -c /dev/nvidiactl ]; then
mknod -m 660 /dev/nvidiactl c 195 255;
chown :video /dev/nvidiactl;
fi;
devid=-1;
for dev in $(ls -d /sys/bus/pci/devices/*); do
vendorid=$(cat $dev/vendor);
if [ "$vendorid" == "0x10de" ]; then
class=$(cat $dev/class);
classid=${class%%00};
if [ "$classid" == "0x0300" -o "$classid" == "0x0302" ]; then