mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
installer: partition: Add encryption password confirmation.
* gnu/installer/newt/partition.scm (prompt-luks-passwords): Add password confirmation page.
This commit is contained in:
parent
cb614af011
commit
f40728f9d6
1 changed files with 19 additions and 4 deletions
|
@ -149,11 +149,26 @@ (define (prompt-luks-passwords user-partitions)
|
||||||
(run-input-page
|
(run-input-page
|
||||||
(format #f (G_ "Please enter the password for the \
|
(format #f (G_ "Please enter the password for the \
|
||||||
encryption of partition ~a (label: ~a).") file-name crypt-label)
|
encryption of partition ~a (label: ~a).") file-name crypt-label)
|
||||||
(G_ "Password required")))))
|
(G_ "Password required"))))
|
||||||
|
(password-confirm-page
|
||||||
|
(lambda ()
|
||||||
|
(run-input-page
|
||||||
|
(format #f (G_ "Please confirm the password for the \
|
||||||
|
encryption of partition ~a (label: ~a).") file-name crypt-label)
|
||||||
|
(G_ "Password confirmation required")))))
|
||||||
(if crypt-label
|
(if crypt-label
|
||||||
(user-partition
|
(let loop ()
|
||||||
(inherit user-part)
|
(let ((password (password-page))
|
||||||
(crypt-password (password-page)))
|
(confirmation (password-confirm-page)))
|
||||||
|
(if (string=? password confirmation)
|
||||||
|
(user-partition
|
||||||
|
(inherit user-part)
|
||||||
|
(crypt-password password))
|
||||||
|
(begin
|
||||||
|
(run-error-page
|
||||||
|
(G_ "Password mismatch, please try again.")
|
||||||
|
(G_ "Password error"))
|
||||||
|
(loop)))))
|
||||||
user-part)))
|
user-part)))
|
||||||
user-partitions))
|
user-partitions))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue