diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-18 17:32:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-18 17:32:35 -0300 |
commit | a0acebce695a2f278bdd522be0ecdfb5c918d2ba (patch) | |
tree | e9a3fc1583d8ae487cac0e8aa5169e64a6fb6dd3 | |
parent | cd5fb92fdf78fcf3770a7767035ce9fc1e31f172 (diff) | |
download | hydra-a0acebce695a2f278bdd522be0ecdfb5c918d2ba.tar.gz hydra-a0acebce695a2f278bdd522be0ecdfb5c918d2ba.tar.bz2 |
Better release checking at system-upgrade
-rwxr-xr-x | share/hydractl/system-upgrade | 8 |
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 |