aboutsummaryrefslogtreecommitdiff
path: root/wireguard-install.sh
diff options
context:
space:
mode:
authorFarzin Monsef <monseffarzin@gmail.com>2020-10-10 16:12:19 +0330
committerGitHub <noreply@github.com>2020-10-10 14:42:19 +0200
commit487aa4fedad8e0b41c59caebe4569b546312c77a (patch)
treef8f6e073e09d34020cd75a34e0c7a1c46378793c /wireguard-install.sh
parent2cd6191c936fe6e1136915f7243ccb09ea94d16d (diff)
arch: Install LTS kernel headers when running LTS kernel (#135)
Diffstat (limited to 'wireguard-install.sh')
-rw-r--r--wireguard-install.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index c752dbf..140dda5 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -141,7 +141,13 @@ 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
- 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
fi