1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-06-13 00:22:21 +00:00

Arch: check if current running kernel is LTS

This commit is contained in:
Farzin 2020-09-15 16:30:47 +04:30
parent 40416da276
commit 0efa6d2eaf

View File

@ -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