Skip to content

Commit

Permalink
Force systems with kernel option "quiet" to still display prompt for …
Browse files Browse the repository at this point in the history
…password

Signed-off-by: Garrett Fields <[email protected]>
  • Loading branch information
ghfields committed Dec 17, 2019
1 parent ddb4e69 commit 95d3be6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/initramfs/scripts/zfs.in
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ decrypt_fs()

# Prompt with ZFS tty, otherwise
else
# Setting "printk" temporarily to "7" will allow prompt even if kernel option "quiet"
storeprintk="$(awk '{print $1}' /proc/sys/kernel/printk)"
echo 7 > /proc/sys/kernel/printk
$ZFS load-key "${ENCRYPTIONROOT}"
echo "$storeprintk" > /proc/sys/kernel/printk
fi
fi
fi
Expand Down

0 comments on commit 95d3be6

Please sign in to comment.