[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/04: system: hurd: Create more ttys.
From: |
guix-commits |
Subject: |
04/04: system: hurd: Create more ttys. |
Date: |
Mon, 28 Nov 2022 05:22:17 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit e3c6575ee93741a43003cd1aa4663151dd90b9f5
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Nov 28 11:18:15 2022 +0100
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.
---
gnu/build/hurd-boot.scm | 17 +++++++++++------
gnu/system/hurd.scm | 44 +++++++++++++++++++++++---------------------
2 files changed, 34 insertions(+), 27 deletions(-)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 99e5c75e11..e068ffc202 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -213,12 +213,17 @@ set."
;; 'fd_to_filename' in libc expects it.
("dev/fd" ("/hurd/magic" "--directory" "fd") #o555)
- ("dev/tty1" ("/hurd/term" "/dev/tty1" "hurdio"
"/dev/vcs/1/console")
- #o666)
- ("dev/tty2" ("/hurd/term" "/dev/tty2" "hurdio"
"/dev/vcs/2/console")
- #o666)
- ("dev/tty3" ("/hurd/term" "/dev/tty3" "hurdio"
"/dev/vcs/3/console")
- #o666)
+ ;; Create a number of ttys; syslogd writes to tty12 by default.
+ ;; FIXME: Creating /dev/tty12 leads the console client to switch to
+ ;; tty12 when syslogd starts, which is confusing for users. Thus, do
+ ;; not create tty12.
+ ,@(map (lambda (n)
+ (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)
(let ((n (number->string n)))
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 4bc32d9bd1..24fc6dbcae 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -75,28 +75,30 @@
info-reader))
(define %base-services/hurd
- (list (service hurd-console-service-type
- (hurd-console-configuration (hurd hurd)))
- (service hurd-getty-service-type (hurd-getty-configuration
- (tty "tty1")))
- (service hurd-getty-service-type (hurd-getty-configuration
- (tty "tty2")))
- (service static-networking-service-type
- (list %loopback-static-networking
+ (append (list (service hurd-console-service-type
+ (hurd-console-configuration (hurd hurd)))
+ (service static-networking-service-type
+ (list %loopback-static-networking
- ;; QEMU user-mode networking. To get "eth0", you need
- ;; QEMU to emulate a device for which Mach has an
- ;; in-kernel driver, for instance with:
- ;; --device rtl8139,netdev=net0 --netdev user,id=net0
- %qemu-static-networking))
- (syslog-service)
- (service guix-service-type
- (guix-configuration
- (extra-options '("--disable-chroot"
- "--disable-deduplication"))))
- (service special-files-service-type
- `(("/bin/sh" ,(file-append bash "/bin/sh"))
- ("/usr/bin/env" ,(file-append coreutils "/bin/env"))))))
+ ;; QEMU user-mode networking. To get "eth0",
you need
+ ;; QEMU to emulate a device for which Mach has
an
+ ;; in-kernel driver, for instance with:
+ ;; --device rtl8139,netdev=net0 --netdev
user,id=net0
+ %qemu-static-networking))
+ (service guix-service-type
+ (guix-configuration
+ (extra-options '("--disable-chroot"
+ "--disable-deduplication"))))
+ (service special-files-service-type
+ `(("/bin/sh" ,(file-append bash "/bin/sh"))
+ ("/usr/bin/env" ,(file-append coreutils
+ "/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
;; Default set of setuid-root programs.