aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/system-upgrade8
1 files changed, 7 insertions, 1 deletions
diff --git a/share/hydractl/system-upgrade b/share/hydractl/system-upgrade
index 5dfe126..0a8e6de 100755
--- a/share/hydractl/system-upgrade
+++ b/share/hydractl/system-upgrade
@@ -25,9 +25,15 @@ BASENAME="`basename $0`"
# Available releases
#release="`facter lsbdistcodename`" # this doesn't work on squeeze
-release="`facter | grep lsbdistcodename | sed -e 's/lsbdistcodename => //'`"
+release="`facter 2> /dev/null | grep lsbdistcodename | sed -e 's/lsbdistcodename => //'`"
nextrelease="`hydra_next_debian_release $release`"
+# Check release
+if [ "$?" != "0" ]; then
+ echo "Unsupported release"
+ exit 1
+fi
+
# Ensure puppet is stopped during the process
echo "Disabling puppet during the upgrade..."
service puppet stop