ZFS: Pipe /dev/null into the stage 2 load-key script

Just in case something reads stdin, so that `while read ds kl` doesn't
miss anything
This commit is contained in:
Will Fancher 2020-06-30 21:35:35 -04:00
parent c128229dce
commit 05f8cba1b6

View File

@ -521,7 +521,7 @@ in
if poolImported "${pool}"; then
${optionalString cfgZfs.requestEncryptionCredentials ''
${packages.zfsUser}/sbin/zfs list -rHo name,keylocation ${pool} | while read ds kl; do
case "$kl" in
(case "$kl" in
none )
;;
prompt )
@ -530,7 +530,7 @@ in
* )
${packages.zfsUser}/sbin/zfs load-key "$ds"
;;
esac
esac) < /dev/null # To protect while read ds kl in case anything reads stdin
done
''}
echo "Successfully imported ${pool}"