Skip to content

Commit

Permalink
Try to read key file properly via StdIn
Browse files Browse the repository at this point in the history
Continue to follow [this route](ba3ccce#commitcomment-47340935).
  • Loading branch information
Olf0 authored Feb 20, 2021
1 parent ba3ccce commit c3a0e8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ AssertFileNotEmpty=/etc/crypto-sdcard/%I.key
[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=file:/etc/crypto-sdcard/%I.key
# For devices, which need the qcrypto kernel module loaded to support modern cryptographic schemes as e.g. XTS:
# ExecStartPre=/sbin/modprobe qcrypto
ExecStart=/bin/sh -c 'cat /etc/crypto-sdcard/%I.key | /usr/sbin/cryptsetup -d - -h sha1 -s 256 -c aes-xts-plain --allow-discards --type plain open /dev/%I %I'
ExecStart=/usr/sbin/cryptsetup -d - -h sha1 -s 256 -c aes-xts-plain --allow-discards --type plain open /dev/%I %I
ExecStop=/usr/sbin/cryptsetup close %I

0 comments on commit c3a0e8c

Please sign in to comment.