aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/system-upgrade
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-08-24 22:06:57 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-08-24 22:06:57 -0300
commitace671aaab66e86568db07a6852ec3aac5a22cd8 (patch)
treead785cd79fe2598720312862ec288fccc49e083e /share/hydractl/system-upgrade
parentbc2d245da47f11b22440e3ff2c2a474120b30af1 (diff)
downloadhydra-ace671aaab66e86568db07a6852ec3aac5a22cd8.tar.gz
hydra-ace671aaab66e86568db07a6852ec3aac5a22cd8.tar.bz2
Cleanup system-upgrade
Diffstat (limited to 'share/hydractl/system-upgrade')
-rwxr-xr-xshare/hydractl/system-upgrade36
1 files changed, 4 insertions, 32 deletions
diff --git a/share/hydractl/system-upgrade b/share/hydractl/system-upgrade
index 358920b..2ad06e6 100755
--- a/share/hydractl/system-upgrade
+++ b/share/hydractl/system-upgrade
@@ -29,10 +29,11 @@ ENV="$TMP/system-upgrade-env"
BASENAME="`basename $0`"
NEXTRELEASE="$1"
-# Record current state of the upgrade
+# Proceed to the next upgrade stage
function hydra_system_upgrade_stage {
STAGE="$1"
echo $STAGE > $STATE
+ hydra_system_upgrade_$STAGE
}
# Set and check upgrade environment
@@ -154,7 +155,7 @@ function hydra_system_upgrade_custom {
}
# Enable puppet again
-function hydra_system_upgrade_custom {
+function hydra_system_upgrade_puppet {
echo ""
echo "Starting puppet again..."
hydractl puppet-enable
@@ -170,38 +171,9 @@ else
# Restore environment
if [ -e "$ENV" ]; then
source $ENV
- hydra_system_upgrade_$STAGE
fi
-fi
-
-# Prepare
-if [ "$STAGE" == "prepare" ]; then
- hydra_system_upgrade_prepare
-fi
-# Download packages
-if [ "$STAGE" == "download" ]; then
- hydra_system_upgrade_download
-fi
-
-# Upgrade the system
-if [ "$STAGE" == "upgrade" ]; then
- hydra_system_upgrade_upgrade
-fi
-
-# Cleanup
-if [ "$STAGE" == "cleanup" ]; then
- hydra_system_upgrade_cleanup
-fi
-
-# Custom procedures
-if [ "$STAGE" == "custom" ]; then
- hydra_system_upgrade_custom
-fi
-
-# Enable puppet again
-if [ "$STAGE" == "puppet" ]; then
- hydra_system_upgrade_puppet
+ hydra_system_upgrade_$STAGE
fi
# Teardown