Page MenuHomeFreeBSD

D36081.diff
No OneTemporary

D36081.diff

diff --git a/libexec/rc/rc.d/zfskeys b/libexec/rc/rc.d/zfskeys
--- a/libexec/rc/rc.d/zfskeys
+++ b/libexec/rc/rc.d/zfskeys
@@ -45,7 +45,15 @@
local kl="$2"
local k="${kl##file://}"
- if [ "$k" ] && [ -f "$k" ] && [ -s "$k" ] && [ -r "$k" ]; then
+ if [ "$kl" == "prompt" ]
+ then
+ echo "Key prompt for $fs."
+ if zfs load-key -L "$kl" "$fs" < /dev/tty > /dev/tty 2>/dev/tty ; then
+ echo "Key loaded for $fs."
+ else
+ echo "Key failed to load for $fs."
+ fi
+ elif [ "$k" ] && [ -f "$k" ] && [ -s "$k" ] && [ -r "$k" ]; then
if [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then
echo "Key already loaded for $fs."
elif keytest=$(zfs load-key -n -L "$kl" "$fs" 2>&1); then

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 6:19 AM (19 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15751273
Default Alt Text
D36081.diff (778 B)

Event Timeline