Kaydet (Commit) c96c6d23 authored tarafından Clement Lefebvre's avatar Clement Lefebvre

NVIDIA driver: Add systemd support

üst c72c1f90
......@@ -8,6 +8,7 @@ case "$1" in
then
systemctl daemon-reload || true
systemctl enable live-installer.service || true
systemctl enable install-live-drivers.service || true
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
......
[Unit]
Description=Installing Live Drivers
Before=lightdm.service
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=oneshot
Restart=no
Before=lightdm.service
ExecStart=/usr/bin/install-live-drivers
StandardOutput=tty
TTYPath=/dev/tty1
[Install]
WantedBy=multi-user.target
#!/usr/bin/python2
import os
import commands
#NVIDIA
driver = "/usr/share/live-installer/nvidia-driver.tar.gz"
if "install-nvidia=" in commands.getoutput("cat /proc/cmdline") and os.path.exists(driver):
print("Installing NVIDIA driver...")
try:
os.system("tar zxvf %s" % driver)
os.system("DEBIAN_FRONTEND=noninteractive dpkg -i --force-depends nvidia-driver/*.deb")
os.system("rm -rf nvidia-driver")
except Exception as e:
print ("Failed to install NVIDIA driver: ", e)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment