diff options
Diffstat (limited to 'examples/hooks/nvidia-legacy.sh')
-rwxr-xr-x | examples/hooks/nvidia-legacy.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/hooks/nvidia-legacy.sh b/examples/hooks/nvidia-legacy.sh index 0dc3c6ec6..f4ce544e6 100755 --- a/examples/hooks/nvidia-legacy.sh +++ b/examples/hooks/nvidia-legacy.sh @@ -1,6 +1,6 @@ #!/bin/sh -# This is a hook for live-helper(7) to install nvidia-legacy drivers +# This is a hook for live-helper(7) to install nvidia-kernel-legacy drivers # To enable it, copy this hook into your config/chroot_localhooks directory. # # Note: This hook requires packages from the non-free section. Make sure you @@ -9,7 +9,14 @@ # Building kernel module which module-assistant || apt-get install --yes module-assistant nvidia-kernel-common module-assistant update -module-assistant --non-inter --quiet auto-install nvidia-kernel-legacy + +for KERNEL in /boot/vmlinuz-* +do + VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')" + + module-assistant --non-inter --quiet auto-install nvidia-kernel-legacy -l ${VERSION} +done + module-assistant clean nvidia-kernel-legacy # Installing additional stuff |