Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update 240_reassign_luks_keyfiles.sh
Use ReaR specific TMP_DIR (not TMPDIR or hardcoded /tmp)
  • Loading branch information
jsmeix committed Jul 24, 2020
1 parent 71741d5 commit 728c2b0
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -24,9 +24,9 @@ awk '
while read target_name source_device original_keyfile; do
Log "Re-assigning keyfile $original_keyfile to LUKS device $target_name ($source_device)"

# The scheme for generating a temporary keyfile path must be the same here and in the 'layout/prepare' stage.
temp_keyfile="${TMPDIR:-/tmp}/LUKS-keyfile-$target_name"
[ -f "$temp_keyfile" ] || BugError "temporary keyfile $temp_keyfile not found"
# The scheme for generating a temporary keyfile path must be the same here and in the 'layout/prepare' stage:
temp_keyfile="$TMP_DIR/LUKS-keyfile-$target_name"
test -f "$temp_keyfile" || BugError "temporary LUKS keyfile $temp_keyfile not found"

target_keyfile="$TARGET_FS_ROOT/$original_keyfile"

Expand Down

0 comments on commit 728c2b0

Please sign in to comment.