Skip to content

Commit

Permalink
Disable Temp Dir for portable mode
Browse files Browse the repository at this point in the history
  • Loading branch information
schlomo committed Apr 10, 2024
1 parent 7fa40b3 commit 38bfd4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions usr/sbin/rear
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,10 @@ if test "$WORKFLOW" != "help" ; then
# and that those temporary files will get cleaned up "by the way"
# via the cleanup_build_area_and_end_program() function,
# see https://github.com/rear/rear/issues/3167
if ! test "$RECOVERY_MODE" ; then
# We set TMPDIR to ReaR's TMP_DIR only when we are not in RECOVERY_MODE
# because TMP_DIR does not exist in the recreated/restored system
if ! [[ "$RECOVERY_MODE" || "$PORTABLE" ]] ; then
# We set TMPDIR to ReaR's TMP_DIR only when we are not in RECOVERY_MODE and also not in PORTABLE mode
# because TMP_DIR does not exist in the recreated/restored system or in the foreign rescue system where
# the portable mode should be able to work without the need to have a TMP_DIR in the rescue system.
# i.e. there is no /mnt/local/var/tmp/rear.XXXXXXXXXXXXXXX/tmp so that
# chroot /mnt/local COMMAND
# fails when COMMAND uses TMPDIR - in particular "chroot /mnt/local dracut" fails
Expand Down

0 comments on commit 38bfd4e

Please sign in to comment.