install: fix rocky kernel packages

This commit is contained in:
Michael Yang 2023-12-01 16:18:21 -08:00
parent 1f126afb2d
commit 95cb38ae47

View file

@ -230,7 +230,8 @@ fi
if ! lsmod | grep -q nvidia; then if ! lsmod | grep -q nvidia; then
KERNEL_RELEASE="$(uname -r)" KERNEL_RELEASE="$(uname -r)"
case $OS_NAME in case $OS_NAME in
centos|rhel|rocky|amzn) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;; rocky) $SUDO $PACKAGE_MANAGER -y install kernel-devel kernel-headers ;;
centos|rhel|amzn) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE kernel-headers-$KERNEL_RELEASE ;;
fedora) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE ;; fedora) $SUDO $PACKAGE_MANAGER -y install kernel-devel-$KERNEL_RELEASE ;;
debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;; debian|ubuntu) $SUDO apt-get -y install linux-headers-$KERNEL_RELEASE ;;
*) exit ;; *) exit ;;