dracut-reencrypt: add finished hook

A finished hook prevents dracut-initqueue from exiting and lets it
finish the batched jobs. Without a "finished hook" and without
"root=<dev>" on the kernel command line, the reencrypt job would not be
executed.

Normally you want to reencrypt without a "root=<dev>" on the kernel
command and want to reboot after the reencrypt job is done.

This patch adds the missing "finished hook".
This commit is contained in:
Harald Hoyer
2017-04-21 13:50:05 +02:00
committed by Milan Broz
parent 8c5760fee7
commit 6a8a6aea54

View File

@@ -24,4 +24,5 @@ if [ -n "$REENC_DEV" ] ; then
/sbin/reencrypt $env{DEVNAME} %s"\n' "$REENC_KEY $REENC_SLOT $REENC_SIZE" /sbin/reencrypt $env{DEVNAME} %s"\n' "$REENC_KEY $REENC_SLOT $REENC_SIZE"
printf 'LABEL="reenc_end"\n' printf 'LABEL="reenc_end"\n'
} > /etc/udev/rules.d/69-reencryption.rules } > /etc/udev/rules.d/69-reencryption.rules
initqueue --unique --finished --name crypt-reencrypt-finished-${REENC_DEV} [ -e /tmp/reencrypted ]
fi fi