summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-14 17:47:53 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-02-14 17:47:53 -0200
commita392569ae17ffdf1c3b0be5430bb4e01943fdde4 (patch)
treeab6a379ec284b0762b7920dae41cec3f6b680c7c /share
parente91d9b8adbca901d22a537c3339a12461f89719a (diff)
downloadhydra-a392569ae17ffdf1c3b0be5430bb4e01943fdde4.tar.gz
hydra-a392569ae17ffdf1c3b0be5430bb4e01943fdde4.tar.bz2
Check if upgrade failed
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/system-upgrade7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/hydractl/system-upgrade b/share/hydractl/system-upgrade
index 53de2b3..40dc352 100755
--- a/share/hydractl/system-upgrade
+++ b/share/hydractl/system-upgrade
@@ -56,6 +56,13 @@ apt-get dist-upgrade -d -y
echo ""
echo "Upgrading the system..."
apt-get dist-upgrade
+
+if [ "$?" != "0" ]; then
+ echo "Upgrade failed. Please fix it manually and run this command again."
+ exit 1
+fi
+
+# Remove unused packages
apt-get autoremove
# Enable puppet again