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:
parent
a0fef6524f
commit
f3625daaf9
1 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue