listupgrade: update script from upstream

This commit is contained in:
Jérémy Lecour 2021-03-23 16:27:15 +01:00 committed by Jérémy Lecour
parent 5a4bd28eaf
commit 3a3cf1395e
2 changed files with 25 additions and 0 deletions

View File

@ -28,6 +28,7 @@ The **patch** part changes incrementally at each release.
* cerbot: use the legacy script on Debian 8 and 9
* evoacme: upstream release 21.01
* evolinux-users: Add sudo rights for nagios for multi-php lxc
* listupgrade: update script from upstream
* minifirewall: change some defaults
* nagios-nrpe: update check_phpfpm_status.pl & install perl dependencies
* redis: use /run instead or /var/run

View File

@ -238,3 +238,27 @@ echo "$downloadstatus" | grep -q 'Download complete and in download only mode'
if [ $? -ne 0 ]; then
echo "$downloadstatus"
fi;
# Also, we try to update each container apt sources
if which lxc-ls > /dev/null; then
for container in $(lxc-ls); do
aptUpdateOutput=$(lxc-attach -n $container -- apt update 2>&1 | (egrep -ve '^(Listing|WARNING|$)' -e upgraded -e 'up to date' || true ))
if (echo "$aptUpdateOutput" | egrep "^Err(:[0-9]+)? http"); then
echo "FATAL CONTAINER - Not able to fetch all sources (probably a pesky (mini)firewall). Please, fix me"
exit 150
fi
# Now we try to fetch all the packages for the next update session
downloadstatus=$(lxc-attach -n $container -- apt dist-upgrade --assume-yes --download-only -q2 2>&1)
echo "$downloadstatus" | grep -q 'Download complete and in download only mode'
if [ $? -ne 0 ]; then
echo "$downloadstatus"
fi;
done
fi