mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Merge pull request #1551 from MichaIng/patch-1
Add support for builtin WireGuard module
This commit is contained in:
commit
e52a2c420b
1 changed files with 2 additions and 8 deletions
|
@ -93,9 +93,6 @@ c=$(( c < 70 ? 70 : c ))
|
||||||
# Override localization settings so the output is in English language.
|
# Override localization settings so the output is in English language.
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
# Enable recursive globbing to find wireguard.ko in /lib/modules.
|
|
||||||
shopt -s globstar
|
|
||||||
|
|
||||||
main(){
|
main(){
|
||||||
# Pre install checks and configs
|
# Pre install checks and configs
|
||||||
rootCheck
|
rootCheck
|
||||||
|
@ -492,12 +489,9 @@ preconfigurePackages(){
|
||||||
# and not part of the .deb).
|
# and not part of the .deb).
|
||||||
# Source: https://github.com/MichaIng/DietPi/blob/7bf5e1041f3b2972d7827c48215069d1c90eee07/dietpi/dietpi-software#L1807-L1815
|
# Source: https://github.com/MichaIng/DietPi/blob/7bf5e1041f3b2972d7827c48215069d1c90eee07/dietpi/dietpi-software#L1807-L1815
|
||||||
WIREGUARD_BUILTIN=0
|
WIREGUARD_BUILTIN=0
|
||||||
for i in /lib/modules/**/wireguard.ko{,.xz}; do
|
if dpkg-query -S '/lib/modules/*/wireguard.ko*' &> /dev/null || modinfo wireguard 2> /dev/null | grep -q '^filename:[[:blank:]]*(builtin)$'; then
|
||||||
[[ -f $i ]] || continue
|
|
||||||
dpkg-query -S "$i" &> /dev/null || continue
|
|
||||||
WIREGUARD_BUILTIN=1
|
WIREGUARD_BUILTIN=1
|
||||||
break
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
if
|
if
|
||||||
# If the module is builtin and the package available, we only need to install wireguard-tools.
|
# If the module is builtin and the package available, we only need to install wireguard-tools.
|
||||||
|
|
Loading…
Reference in a new issue