From 0bd260f0d8ec2ffa3559daa0f4f4dbdf70e4d32a Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 31 Oct 2015 11:25:43 +1100 Subject: [PATCH] reboot-no-passphrase always use last key slot --- etc/systemd/system/disable-crypto_keyfile@.service | 2 +- scripts/reboot-no-passphrase | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2