arch: Install LTS kernel headers when running LTS kernel (#135)

This commit is contained in:
Farzin Monsef 2020-10-10 16:12:19 +03:30 committed by GitHub
parent 2cd6191c93
commit 487aa4feda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,13 @@ function installWireGuard() {
yum -y install epel-release kernel kernel-devel kernel-headers yum -y install epel-release kernel kernel-devel kernel-headers
yum -y install wireguard-dkms wireguard-tools iptables qrencode yum -y install wireguard-dkms wireguard-tools iptables qrencode
elif [[ ${OS} == 'arch' ]]; then elif [[ ${OS} == 'arch' ]]; then
pacman -S --noconfirm linux-headers # Check if current running kernel is LTS
ARCH_KERNEL_RELEASE=$(uname -r)
if [[ ${ARCH_KERNEL_RELEASE} == *lts* ]]; then
pacman -S --noconfirm linux-lts-headers
else
pacman -S --noconfirm linux-headers
fi
pacman -S --noconfirm wireguard-tools iptables qrencode pacman -S --noconfirm wireguard-tools iptables qrencode
fi fi