]> gitweb.fluxo.info Git - hydra.git/commitdiff
Check if upgrade failed
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Feb 2013 19:47:53 +0000 (17:47 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Feb 2013 19:47:53 +0000 (17:47 -0200)
share/hydractl/system-upgrade

index 53de2b3ed4da0b1afefb4aff1faeadd55da4863f..40dc3527e5429f0c751d3c046f465dab5e052b08 100755 (executable)
@@ -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