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

ynh_detect_arch is now deprecated

This commit is contained in:
tituspijean 2021-12-12 17:59:22 +01:00
parent 31c4a2176c
commit 806e6d4b18
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -71,14 +71,13 @@ then
fi
# Downgrade linux-image-$arch if updated to the buster-backports version
arch=$(ynh_detect_arch)
linuximage_version=$(ynh_package_version --package=linux-image-$arch)
linuximage_version=$(ynh_package_version --package=linux-image-$architecture)
if [[ $linuximage_version == *"bpo10"* ]]
then
# Downgrading using ynh_package_install apt command without "--no-remove" and with "--allow-downgrades"
# It will remove wireguard-ynh-deps and wireguard but they will be reinstalled throught upgrade process
ynh_apt --allow-downgrades --option Dpkg::Options::=--force-confdef \
--option Dpkg::Options::=--force-confold install linux-image-$arch/stable
--option Dpkg::Options::=--force-confold install linux-image-$architecture/stable
#Remove backports kernel if running on it and send a mail to the admin to ask him to reboot
linuxkernel_version=$(uname -r)