From 0efa6d2eaf218d2b01e461a1e4ad1810939e663a Mon Sep 17 00:00:00 2001 From: Farzin Date: Tue, 15 Sep 2020 16:30:47 +0430 Subject: [PATCH] Arch: check if current running kernel is LTS --- wireguard-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index e789e9e..94692a6 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -143,8 +143,9 @@ function installWireGuard() { yum -y install epel-release kernel kernel-devel kernel-headers yum -y install wireguard-dkms wireguard-tools iptables qrencode elif [[ ${OS} == 'arch' ]]; then - ARCH_LTS_KERNEL=$(pacman -Qs linux-lts) - if [[ -n ${ARCH_LTS_KERNEL} ]]; then + # 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