Revert "Internal: improve rootfs cache creation"

This reverts commit 04f8d5049d.
This commit is contained in:
Igor Pecovnik 2021-02-22 22:35:49 +01:00
parent 37c324975f
commit 32f018471f

View File

@ -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"
} #############################################################################