From: James Bunton Date: Sat, 31 Oct 2015 00:25:43 +0000 (+1100) Subject: reboot-no-passphrase always use last key slot X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/0bd260f0d8ec2ffa3559daa0f4f4dbdf70e4d32a reboot-no-passphrase always use last key slot --- diff --git a/etc/systemd/system/disable-crypto_keyfile@.service b/etc/systemd/system/disable-crypto_keyfile@.service index 26ce006..19dd58f 100644 --- a/etc/systemd/system/disable-crypto_keyfile@.service +++ b/etc/systemd/system/disable-crypto_keyfile@.service @@ -4,7 +4,7 @@ After=basic.target [Service] Type=oneshot -ExecStart=/bin/cryptsetup luksRemoveKey /dev/disk/by-uuid/%i /crypto_keyfile.bin +ExecStart=/bin/cryptsetup luksRemoveKey /dev/disk/by-uuid/%i /crypto_keyfile.bin --key-slot 7 SuccessExitStatus=2 [Install] diff --git a/scripts/reboot-no-passphrase b/scripts/reboot-no-passphrase index bc81a99..fe4af44 100755 --- a/scripts/reboot-no-passphrase +++ b/scripts/reboot-no-passphrase @@ -24,5 +24,5 @@ if [ -z "$device_filename" ]; then fi set -ex -sudo cryptsetup luksAddKey "$device_filename" "$crypto_keyfile" +sudo cryptsetup luksAddKey "$device_filename" "$crypto_keyfile" --key-slot 7 sudo reboot