mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
installer: Move <secret> to utils and use it for crypt passwords.
* gnu/installer/user.scm (<secret>, secret?, make-secret, secret-content): Move to utils.scm. * gnu/installer/utils.scm (<secret>, secret?, make-secret, secret-content): Moved from user.scm. * gnu/installer/newt/partition.scm (prompt-luks-passwords): Make password a <secret>. * gnu/installer/parted.scm (luks-format-and-open): Unwrap secret. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
3c4024e9f5
commit
4814ec284f
4 changed files with 23 additions and 20 deletions
|
@ -23,6 +23,8 @@
|
|||
#:use-module (guix build utils)
|
||||
#:use-module (guix i18n)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
#:use-module (srfi srfi-9 gnu)
|
||||
#:use-module (srfi srfi-19)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-35)
|
||||
|
@ -33,7 +35,12 @@
|
|||
#:use-module (ice-9 regex)
|
||||
#:use-module (ice-9 format)
|
||||
#:use-module (ice-9 textual-ports)
|
||||
#:export (read-lines
|
||||
#:export (<secret>
|
||||
secret?
|
||||
make-secret
|
||||
secret-content
|
||||
|
||||
read-lines
|
||||
read-all
|
||||
nearest-exact-integer
|
||||
read-percentage
|
||||
|
@ -58,6 +65,16 @@
|
|||
|
||||
with-silent-shepherd))
|
||||
|
||||
(define-record-type <secret>
|
||||
(make-secret content)
|
||||
secret?
|
||||
(content secret-content))
|
||||
|
||||
(set-record-type-printer!
|
||||
<secret>
|
||||
(lambda (secret port)
|
||||
(format port "<secret>")))
|
||||
|
||||
(define* (read-lines #:optional (port (current-input-port)))
|
||||
"Read lines from PORT and return them as a list."
|
||||
(let loop ((line (read-line port))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue