Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions autopart-luks-2.ks.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ if [[ "$result" != "2" ]] ; then
exit 1
fi

# Check if the 'allow-discards' flag is set.
result=$(cryptsetup luksDump ${crypted} | grep "Flags" | cut -d: -f2 | tr -d "\t\n ")

if [[ "$result" != "allow-discards" ]] ; then
echo "*** unexpected flags set for ${crypted}: ${result}" > /root/RESULT
exit 1
fi

# Try to use the passphrase.
echo "passphrase" | cryptsetup luksOpen --test-passphrase "${crypted}"

Expand Down