1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

Do not require linux headers if kernel version >= 5.6

This commit is contained in:
tituspijean 2021-11-06 16:00:12 +01:00
parent a0fef6524f
commit f3625daaf9
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -4,11 +4,16 @@
# COMMON VARIABLES
#=================================================
# dependencies used by the app
if grep "Raspberry Pi" /proc/device-tree/model; then
pkg_headers="raspberrypi-kernel-headers"
# WireGuard was integrated in Linux kernel 5.6
# Before that, we need Linux Headers
if dpkg --compare-versions $(uname -r) lt 5.6; then
if grep "Raspberry Pi" /proc/device-tree/model; then
pkg_headers="raspberrypi-kernel-headers"
else
pkg_headers="linux-headers-$(uname -r)"
fi
else
pkg_headers="linux-headers-$(uname -r)"
pkg_headers=""
fi
# dependencies used by the app