https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296130

--- Comment #10 from Doug Ambrisko <[email protected]> ---
I can put this up for review
diff --git a/libexec/rc/rc.d/zfskeys b/libexec/rc/rc.d/zfskeys
index aff0224d5c9d..35f32b3baeb4 100755
--- a/libexec/rc/rc.d/zfskeys
+++ b/libexec/rc/rc.d/zfskeys
@@ -45,13 +45,14 @@ unlock_fs()
     local kl="$2"
     local k="${kl##file://}"

-    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."
+    if [ "$kl" == "prompt" ]; then
+       if checkyesno zfskeys_prompt_enable ; 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
         fi
     elif [ "$k" ] && [ -f "$k" ] && [ -s "$k" ] && [ -r "$k" ]; then
         if [ "$(zfs get -Ho value keystatus "$fs")" = 'available' ]; then

I tested it with
  zfs_enable="YES"
  zfskeys_enable="YES"
  zfskeys_prompt_enable="YES"
/etc/rc.conf that worked for my case.  Without zfskeys_prompt_enable="YES" it
dropped into single user mode since it couldn't mount the needed file systems
for my boot.  Unless someone has zfskeys_prompt_enable="YES" then nothing
should change.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to