From 32f018471fe53f3b1bc8772b4920db9cee3d1a01 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Mon, 22 Feb 2021 22:35:49 +0100 Subject: [PATCH] Revert "Internal: improve rootfs cache creation" This reverts commit 04f8d5049dff7b3db33d5b02295c0bef510cece3. --- lib/debootstrap.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/debootstrap.sh b/lib/debootstrap.sh index f689a4feff..3b7116de00 100644 --- a/lib/debootstrap.sh +++ b/lib/debootstrap.sh @@ -130,15 +130,6 @@ create_rootfs_cache() done - # used for internal purposes. Faster rootfs cache rebuilding - if [[ -n "$ROOT_FS_CREATE_ONLY" ]]; then - [[ $use_tmpfs = yes ]] && umount $SDCARD - rm -rf $SDCARD - # remove exit trap - trap - INT TERM EXIT - exit - fi - if [[ -f $cache_fname && "$ROOT_FS_CREATE_ONLY" != "force" ]]; then local date_diff=$(( ($(date +%s) - $(stat -c %Y $cache_fname)) / 86400 )) display_alert "Extracting $display_name" "$date_diff days old" "info" @@ -299,6 +290,15 @@ create_rootfs_cache() fi + # used for internal purposes. Faster rootfs cache rebuilding + if [[ -n "$ROOT_FS_CREATE_ONLY" ]]; then + [[ $use_tmpfs = yes ]] && umount $SDCARD + rm -rf $SDCARD + # remove exit trap + trap - INT TERM EXIT + exit + fi + mount_chroot "$SDCARD" } #############################################################################