system: hurd: Add /etc/{passwd,shadow}.

* gnu/system/hurd.scm: Generate hard-coded /etc/{passwd,shadow},
allows running chown in MAKEDEV and loggin in.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-04-05 14:36:34 +02:00 committed by Ludovic Courtès
parent cd4faab563
commit 6598c6149b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -80,6 +80,18 @@ menuentry \"GNU\" {
/dev/hd0s1 / ext2 defaults /dev/hd0s1 / ext2 defaults
")) "))
(define passwd
(plain-file "passwd"
"root:x:0:0:root:/root:/bin/sh
"
))
(define shadow
(plain-file "shadow"
"root::0:0:0:0:::
"
))
(define hurd-directives (define hurd-directives
`((directory "/servers") `((directory "/servers")
,@(map (lambda (server) ,@(map (lambda (server)
@ -104,6 +116,8 @@ menuentry \"GNU\" {
hurd) hurd)
"/hurd")) "/hurd"))
("/etc/fstab" -> ,fstab) ("/etc/fstab" -> ,fstab)
("/etc/passwd" -> ,passwd)
("/etc/shadow" -> ,shadow)
;; XXX can we instead, harmlessly set _PATH_TTYS (from glibc) in runttys.c? ;; XXX can we instead, harmlessly set _PATH_TTYS (from glibc) in runttys.c?
("/etc/ttys" -> ,(file-append (with-parameters ((%current-target-system ("/etc/ttys" -> ,(file-append (with-parameters ((%current-target-system
"i586-pc-gnu")) "i586-pc-gnu"))
@ -115,7 +129,9 @@ menuentry \"GNU\" {
#:device-nodes 'hurd #:device-nodes 'hurd
#:inputs `(("system" ,hurd-os) #:inputs `(("system" ,hurd-os)
("grub.cfg" ,grub.cfg) ("grub.cfg" ,grub.cfg)
("fstab" , fstab)) ("fstab" ,fstab)
("passwd" ,passwd)
("shadow" ,shadow))
#:copy-inputs? #t #:copy-inputs? #t
#:os hurd-os #:os hurd-os
#:bootcfg-drv grub.cfg #:bootcfg-drv grub.cfg