summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-05-25 19:30:42 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-05-25 19:30:42 (GMT)
commit266e38cc13fe4f1388dfc792349a9dc333b87de6 (patch)
treeeb08eeda202f16a62df134c964b38235ebcf23a3 /scripts/functions
parente49e7c80a2925dedc184ae0a746aef5d20a6326c (diff)
Add the possibility to stop after a specified step.
Update the Makefile help and the documentation accordingly.
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 71eac4f..dcf4160 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -519,12 +519,14 @@ CT_DoSaveState() {
CT_DoLoadState(){
local state_name="$1"
local state_dir="${CT_STATE_DIR}/${state_name}"
+ local old_RESTART="${CT_RESTART}"
+ local old_STOP="${CT_STOP}"
# We need to do something special with the log file!
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
exec >"${state_dir}/tail.log"
fi
- CT_DoLog DEBUG "Restoring state at step \"${state_name}\"..."
+ CT_DoLog INFO "Restoring state at step \"${state_name}\", as requested."
case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in
y) tar_opt=xzf; tar_ext=".tar.gz";;
@@ -551,6 +553,11 @@ CT_DoLoadState(){
CT_DoLog DEBUG " Restoring environment"
. "${state_dir}/env.sh" >/dev/null 2>&1 || true
+ # Restore the new RESTART and STOP steps
+ CT_RESTART="${old_RESTART}"
+ CT_STOP="${old_STOP}"
+ unset old_stop old_restart
+
if [ "${CT_LOG_TO_FILE}" = "y" ]; then
CT_DoLog DEBUG " Restoring log file"
exec >/dev/null