mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
fix(installer): fix code style
Fix a code style bug
This commit is contained in:
parent
10d9610bdc
commit
d049755f82
1 changed files with 7 additions and 0 deletions
|
@ -661,30 +661,37 @@ preconfigurePackages() {
|
||||||
# to install wireguard-tools.
|
# to install wireguard-tools.
|
||||||
[[ "${WIREGUARD_BUILTIN}" -eq 1 && -n "${AVAILABLE_WIREGUARD}" ]] \
|
[[ "${WIREGUARD_BUILTIN}" -eq 1 && -n "${AVAILABLE_WIREGUARD}" ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# If the package is not available, on Debian and Raspbian we can
|
# If the package is not available, on Debian and Raspbian we can
|
||||||
# add it via Bullseye repository.
|
# add it via Bullseye repository.
|
||||||
[[ "${WIREGUARD_BUILTIN}" -eq 1 && ("${PLAT}" == 'Debian' || "${PLAT}" == 'Raspbian') ]] \
|
[[ "${WIREGUARD_BUILTIN}" -eq 1 && ("${PLAT}" == 'Debian' || "${PLAT}" == 'Raspbian') ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# If the module is not builtin, on Raspbian we know the headers
|
# If the module is not builtin, on Raspbian we know the headers
|
||||||
# package: raspberrypi-kernel-headers
|
# package: raspberrypi-kernel-headers
|
||||||
[[ "${PLAT}" == 'Raspbian' ]] \
|
[[ "${PLAT}" == 'Raspbian' ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# On Alpine, the kernel must be linux-lts or linux-virt if we want to
|
# On Alpine, the kernel must be linux-lts or linux-virt if we want to
|
||||||
# load the kernel module
|
# load the kernel module
|
||||||
[[ "${PLAT}" == 'Alpine' && ! -f /.dockerenv && "$(uname -mrs)" =~ ^Linux\ +[0-9\.\-]+\-((lts)|(virt))\ +.*$ ]] \
|
[[ "${PLAT}" == 'Alpine' && ! -f /.dockerenv && "$(uname -mrs)" =~ ^Linux\ +[0-9\.\-]+\-((lts)|(virt))\ +.*$ ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# On Alpine Docker Container, the responsibility to have a WireGuard
|
# On Alpine Docker Container, the responsibility to have a WireGuard
|
||||||
# module on the host system is at user side
|
# module on the host system is at user side
|
||||||
[[ "${PLAT}" == 'Alpine' && -f /.dockerenv ]] \
|
[[ "${PLAT}" == 'Alpine' && -f /.dockerenv ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# On Debian (and Ubuntu), we can only reliably assume the headers package
|
# On Debian (and Ubuntu), we can only reliably assume the headers package
|
||||||
# for amd64: linux-image-amd64
|
# for amd64: linux-image-amd64
|
||||||
[[ "${PLAT}" == 'Debian' && "${DPKG_ARCH}" == 'amd64' ]] \
|
[[ "${PLAT}" == 'Debian' && "${DPKG_ARCH}" == 'amd64' ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# On Ubuntu, additionally the WireGuard package needs to be available,
|
# On Ubuntu, additionally the WireGuard package needs to be available,
|
||||||
# since we didn't test mixing Ubuntu repositories.
|
# since we didn't test mixing Ubuntu repositories.
|
||||||
[[ "${PLAT}" == 'Ubuntu' && "${DPKG_ARCH}" == 'amd64' && -n "${AVAILABLE_WIREGUARD}" ]] \
|
[[ "${PLAT}" == 'Ubuntu' && "${DPKG_ARCH}" == 'amd64' && -n "${AVAILABLE_WIREGUARD}" ]] \
|
||||||
||
|
||
|
||||||
|
|
||||||
# Ubuntu focal has wireguard support
|
# Ubuntu focal has wireguard support
|
||||||
[[ "${PLAT}" == 'Ubuntu' && "${DPKG_ARCH}" == 'arm64' && "${OSCN}" == 'focal' && -n "${AVAILABLE_WIREGUARD}" ]]
|
[[ "${PLAT}" == 'Ubuntu' && "${DPKG_ARCH}" == 'arm64' && "${OSCN}" == 'focal' && -n "${AVAILABLE_WIREGUARD}" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue