mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
Force systems with kernel option "quiet" to display prompt for password
On systems that utilize TTY for password entry, if the kernel option "quiet" is set, the system would appear to freeze on a blank screen, when in fact it is waiting for password entry from the user. Since TTY is the fallback method, this has no effect on systemd or plymouth password prompting. By temporarily setting "printk" to "7", running the command, then resuming with the original "printk" state, the user can see the password prompt. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Garrett Fields <ghfields@gmail.com> Closes #9731
This commit is contained in:
parent
0f256176d9
commit
fb244566c2
@ -436,7 +436,11 @@ decrypt_fs()
|
|||||||
|
|
||||||
# Prompt with ZFS tty, otherwise
|
# Prompt with ZFS tty, otherwise
|
||||||
else
|
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}"
|
$ZFS load-key "${ENCRYPTIONROOT}"
|
||||||
|
echo "$storeprintk" > /proc/sys/kernel/printk
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user