File modprobe.nvidia.install of Package nvidia-gfxG03

# convert to one line via " awk '{ printf "%s ", $0 }' " script.txt'

PATH=$PATH:/bin:/usr/bin;
if /sbin/modprobe --ignore-install nvidia; then
  if /sbin/modprobe nvidia_uvm; then
    if [ ! -c /dev/nvidia-uvm ]; 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;
  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 
        devid=$((devid+1));
        if [ ! -c /dev/nvidia${devid} ]; then 
          mknod -m 660 /dev/nvidia${devid} c 195 ${devid}; 
          chown :video /dev/nvidia${devid};
        fi;
      fi;
    fi;
  done;
fi