me
/
guix
Archived
1
0
Fork 0

system: hurd: Create more ttys.

* gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add
more /dev/ttyN nodes.
* gnu/system/hurd.scm (%base-services/hurd): Add more
'hurd-getty-service-type' instances.
Ludovic Courtès 2022-11-28 11:18:15 +01:00
parent ed6fdf3aef
commit e3c6575ee9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
2 changed files with 34 additions and 27 deletions

View File

@ -213,12 +213,17 @@ set."
;; 'fd_to_filename' in libc expects it. ;; 'fd_to_filename' in libc expects it.
("dev/fd" ("/hurd/magic" "--directory" "fd") #o555) ("dev/fd" ("/hurd/magic" "--directory" "fd") #o555)
("dev/tty1" ("/hurd/term" "/dev/tty1" "hurdio" "/dev/vcs/1/console") ;; Create a number of ttys; syslogd writes to tty12 by default.
#o666) ;; FIXME: Creating /dev/tty12 leads the console client to switch to
("dev/tty2" ("/hurd/term" "/dev/tty2" "hurdio" "/dev/vcs/2/console") ;; tty12 when syslogd starts, which is confusing for users. Thus, do
#o666) ;; not create tty12.
("dev/tty3" ("/hurd/term" "/dev/tty3" "hurdio" "/dev/vcs/3/console") ,@(map (lambda (n)
#o666) (let ((n (number->string n)))
`(,(string-append "dev/tty" n)
("/hurd/term" ,(string-append "/dev/tty" n)
"hurdio" ,(string-append "/dev/vcs/" n "/console"))
#o666)))
(iota 11 1))
,@(append-map (lambda (n) ,@(append-map (lambda (n)
(let ((n (number->string n))) (let ((n (number->string n)))

View File

@ -75,28 +75,30 @@
info-reader)) info-reader))
(define %base-services/hurd (define %base-services/hurd
(list (service hurd-console-service-type (append (list (service hurd-console-service-type
(hurd-console-configuration (hurd hurd))) (hurd-console-configuration (hurd hurd)))
(service hurd-getty-service-type (hurd-getty-configuration (service static-networking-service-type
(tty "tty1"))) (list %loopback-static-networking
(service hurd-getty-service-type (hurd-getty-configuration
(tty "tty2")))
(service static-networking-service-type
(list %loopback-static-networking
;; QEMU user-mode networking. To get "eth0", you need ;; QEMU user-mode networking. To get "eth0", you need
;; QEMU to emulate a device for which Mach has an ;; QEMU to emulate a device for which Mach has an
;; in-kernel driver, for instance with: ;; in-kernel driver, for instance with:
;; --device rtl8139,netdev=net0 --netdev user,id=net0 ;; --device rtl8139,netdev=net0 --netdev user,id=net0
%qemu-static-networking)) %qemu-static-networking))
(syslog-service) (service guix-service-type
(service guix-service-type (guix-configuration
(guix-configuration (extra-options '("--disable-chroot"
(extra-options '("--disable-chroot" "--disable-deduplication"))))
"--disable-deduplication")))) (service special-files-service-type
(service special-files-service-type `(("/bin/sh" ,(file-append bash "/bin/sh"))
`(("/bin/sh" ,(file-append bash "/bin/sh")) ("/usr/bin/env" ,(file-append coreutils
("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) "/bin/env"))))
(syslog-service))
(map (lambda (n)
(service hurd-getty-service-type
(hurd-getty-configuration
(tty (string-append "tty" (number->string n))))))
(iota 6 1))))
(define %setuid-programs/hurd (define %setuid-programs/hurd
;; Default set of setuid-root programs. ;; Default set of setuid-root programs.