Commit 82bee189 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible Debian: try to automatically fixup spurious pbuilder failures

parent e6f7c6d4
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -156,6 +156,11 @@ fi
# check whether all services are running fine
#
echo "$(date -u) - checking whether all services are running fine..."
if ! systemctl is-system-running > /dev/null; then
	if [ -n "$(systemctl list-units --state=error,failed | grep pbuilder_build)" ] ; then
		echo "$(date -u) - resetting failed services (once) as some failed pbuilder_build have been found..."
	        sudo systemctl reset-failed
	fi
	if ! systemctl is-system-running > /dev/null; then
		systemctl status|head -5
		echo "Warning: systemd is reporting errors:"
@@ -163,6 +168,7 @@ if ! systemctl is-system-running > /dev/null; then
		echo "Manual cleanup needed. If only old sessions are gone, use 'systemctl reset-failed' to cleanup state. Else probably some services actually need a restart."
		DIRTY=true
	fi
fi

# checks only for the main node
#