Browse Source

listupgrade: update script from upstream

pull/124/head
Jérémy Lecour 4 weeks ago
committed by Jérémy Lecour
parent
commit
3a3cf1395e
  1. 1
      CHANGELOG.md
  2. 24
      listupgrade/files/listupgrade.sh

1
CHANGELOG.md

@ -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

24
listupgrade/files/listupgrade.sh

@ -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
Loading…
Cancel
Save