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
}
# Enable puppet again
-function hydra_system_upgrade_custom {
+function hydra_system_upgrade_puppet {
echo ""
echo "Starting puppet again..."
hydractl puppet-enable
# 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