Skip to content

Commit

Permalink
Update 3-tpm2clevis-prepluksandinstallhooks.sh
Browse files Browse the repository at this point in the history
added test "trap" command.
  • Loading branch information
noahbliss authored Jan 11, 2021
1 parent fd2f065 commit 8a71fbe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 3-tpm2clevis-prepluksandinstallhooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fi
#Create tpmramfs for read user luks password to file.
if mkdir tmpramfs && mount tmpfs -t tmpfs -o size=1M,noexec,nosuid tmpramfs; then
echo "Created tmpramfs to store luks key during setup."
trap "if [ -f tmpramfs/user.key ]; then rm -f tmpramfs/user.key; fi" EXIT
echo -n "Enter luks password: "; read -s PASSWORD; echo
echo -n "$PASSWORD" > tmpramfs/user.key
unset PASSWORD
Expand Down

0 comments on commit 8a71fbe

Please sign in to comment.