mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Avoid hardcoding distribution codenames
- Actually check for apt >= 1.5 instead of checking for distributions known for having a newer package
This commit is contained in:
parent
8cf9f108f9
commit
ba7c46aae8
1 changed files with 4 additions and 3 deletions
|
@ -458,10 +458,11 @@ notifyPackageUpdatesAvailable(){
|
||||||
}
|
}
|
||||||
|
|
||||||
preconfigurePackages(){
|
preconfigurePackages(){
|
||||||
# Add support for https repositories that will be used later on
|
# If apt is older than 1.5 we need to install an additional package to add
|
||||||
|
# support for https repositories that will be used later on
|
||||||
if [[ -f /etc/apt/sources.list ]]; then
|
if [[ -f /etc/apt/sources.list ]]; then
|
||||||
# buster and bionic have apt >= 1.5 which has https support built in
|
INSTALLED_APT="$(apt-cache policy apt | grep -m1 'Installed: ' | grep -v '(none)' | awk '{print $2}')"
|
||||||
if [[ ${OSCN} != "buster" ]] && [[ ${OSCN} != "bionic" ]]; then
|
if dpkg --compare-versions "$INSTALLED_APT" lt 1.5; then
|
||||||
BASE_DEPS+=("apt-transport-https")
|
BASE_DEPS+=("apt-transport-https")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue