From a2a63639b91ca9af612ad71d38b2ec773badd722 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Thu, 9 Dec 2021 19:56:04 +0100 Subject: [PATCH] fixed loss of stage file after bootstrap --- lib/zzz_main_fct.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/zzz_main_fct.sh b/lib/zzz_main_fct.sh index e1ca2f0..2153e61 100644 --- a/lib/zzz_main_fct.sh +++ b/lib/zzz_main_fct.sh @@ -167,6 +167,11 @@ chroot_bootstrap() prnt I "Changing root and starting a fork of init.sh..." chroot $CHROOT_PATH /bin/bash -c 'CHROOT_DONE=true; $tmpdir/init.sh $@' + # If stage file still exists we copy it to be able to resume later + if [[ -e $tmpdir/$(basename $STAGE_FILE) ]]; then + cp $tmpdir/$(basename $STAGE_FILE) $STAGE_FILE + fi + prnt I "Back to host system and clean up." rm -rf $tmpdir } @@ -222,7 +227,7 @@ load_configuration() if [[ -n $CONFFILES ]]; then local f= for f in $CONFFILES; do - prnt I "Loading $f manuelly specified." + prnt I "Loading $f manually specified." if [[ -s $f ]]; then . $f else