listupgrade: update script from upstream
This commit is contained in:
parent
5a4bd28eaf
commit
3a3cf1395e
|
@ -28,6 +28,7 @@ The **patch** part changes incrementally at each release.
|
||||||
* cerbot: use the legacy script on Debian 8 and 9
|
* cerbot: use the legacy script on Debian 8 and 9
|
||||||
* evoacme: upstream release 21.01
|
* evoacme: upstream release 21.01
|
||||||
* evolinux-users: Add sudo rights for nagios for multi-php lxc
|
* evolinux-users: Add sudo rights for nagios for multi-php lxc
|
||||||
|
* listupgrade: update script from upstream
|
||||||
* minifirewall: change some defaults
|
* minifirewall: change some defaults
|
||||||
* nagios-nrpe: update check_phpfpm_status.pl & install perl dependencies
|
* nagios-nrpe: update check_phpfpm_status.pl & install perl dependencies
|
||||||
* redis: use /run instead or /var/run
|
* redis: use /run instead or /var/run
|
||||||
|
|
|
@ -238,3 +238,27 @@ echo "$downloadstatus" | grep -q 'Download complete and in download only mode'
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "$downloadstatus"
|
echo "$downloadstatus"
|
||||||
fi;
|
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…
Reference in a new issue