services: agetty: Really import (gnu build linux-boot).

This is a followup to commit 62c2217570fb3a3437e8316d3679b7fe13db0884.

* gnu/services/base.scm (agetty-shepherd-service)[start]: Wrap un
'with-imported-modules'.  This fixes a build error when TTY is true
("no code for module (gnu build linux-boot)").
This commit is contained in:
Ludovic Courtès 2019-10-21 16:10:33 +02:00
parent cfe8d8063b
commit 5f15b42273
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -990,7 +990,6 @@ to use as the tty. This is primarily useful for headless systems."
erase-characters kill-characters chdir delay nice extra-options) erase-characters kill-characters chdir delay nice extra-options)
(list (list
(shepherd-service (shepherd-service
(modules '((ice-9 match) (gnu build linux-boot)))
(documentation "Run agetty on a tty.") (documentation "Run agetty on a tty.")
(provision (list (symbol-append 'term- (string->symbol (or tty "auto"))))) (provision (list (symbol-append 'term- (string->symbol (or tty "auto")))))
@ -1000,122 +999,126 @@ to use as the tty. This is primarily useful for headless systems."
;; mingetty-shepherd-service). ;; mingetty-shepherd-service).
(requirement '(user-processes host-name udev)) (requirement '(user-processes host-name udev))
(start #~(lambda args (modules '((ice-9 match) (gnu build linux-boot)))
(let ((defaulted-tty #$(or tty (default-serial-port)))) (start
(apply (with-imported-modules (source-module-closure
(if defaulted-tty '((gnu build linux-boot)))
(make-forkexec-constructor #~(lambda args
(list #$(file-append util-linux "/sbin/agetty") (let ((defaulted-tty #$(or tty (default-serial-port))))
#$@extra-options (apply
#$@(if eight-bits? (if defaulted-tty
#~("--8bits") (make-forkexec-constructor
#~()) (list #$(file-append util-linux "/sbin/agetty")
#$@(if no-reset? #$@extra-options
#~("--noreset") #$@(if eight-bits?
#~()) #~("--8bits")
#$@(if remote? #~())
#~("--remote") #$@(if no-reset?
#~()) #~("--noreset")
#$@(if flow-control? #~())
#~("--flow-control") #$@(if remote?
#~()) #~("--remote")
#$@(if host #~())
#~("--host" #$host) #$@(if flow-control?
#~()) #~("--flow-control")
#$@(if no-issue? #~())
#~("--noissue") #$@(if host
#~()) #~("--host" #$host)
#$@(if init-string #~())
#~("--init-string" #$init-string) #$@(if no-issue?
#~()) #~("--noissue")
#$@(if no-clear? #~())
#~("--noclear") #$@(if init-string
#~()) #~("--init-string" #$init-string)
#~())
#$@(if no-clear?
#~("--noclear")
#~())
;;; FIXME This doesn't work as expected. According to agetty(8), if this option ;;; FIXME This doesn't work as expected. According to agetty(8), if this option
;;; is not passed, then the default is 'auto'. However, in my tests, when that ;;; is not passed, then the default is 'auto'. However, in my tests, when that
;;; option is selected, agetty never presents the login prompt, and the ;;; option is selected, agetty never presents the login prompt, and the
;;; term-ttyS0 service respawns every few seconds. ;;; term-ttyS0 service respawns every few seconds.
#$@(if local-line #$@(if local-line
#~(#$(match local-line #~(#$(match local-line
('auto "--local-line=auto") ('auto "--local-line=auto")
('always "--local-line=always") ('always "--local-line=always")
('never "-local-line=never"))) ('never "-local-line=never")))
#~()) #~())
#$@(if tty #$@(if tty
#~() #~()
#~("--keep-baud")) #~("--keep-baud"))
#$@(if extract-baud? #$@(if extract-baud?
#~("--extract-baud") #~("--extract-baud")
#~()) #~())
#$@(if skip-login? #$@(if skip-login?
#~("--skip-login") #~("--skip-login")
#~()) #~())
#$@(if no-newline? #$@(if no-newline?
#~("--nonewline") #~("--nonewline")
#~()) #~())
#$@(if login-options #$@(if login-options
#~("--login-options" #$login-options) #~("--login-options" #$login-options)
#~()) #~())
#$@(if chroot #$@(if chroot
#~("--chroot" #$chroot) #~("--chroot" #$chroot)
#~()) #~())
#$@(if hangup? #$@(if hangup?
#~("--hangup") #~("--hangup")
#~()) #~())
#$@(if keep-baud? #$@(if keep-baud?
#~("--keep-baud") #~("--keep-baud")
#~()) #~())
#$@(if timeout #$@(if timeout
#~("--timeout" #$(number->string timeout)) #~("--timeout" #$(number->string timeout))
#~()) #~())
#$@(if detect-case? #$@(if detect-case?
#~("--detect-case") #~("--detect-case")
#~()) #~())
#$@(if wait-cr? #$@(if wait-cr?
#~("--wait-cr") #~("--wait-cr")
#~()) #~())
#$@(if no-hints? #$@(if no-hints?
#~("--nohints?") #~("--nohints?")
#~()) #~())
#$@(if no-hostname? #$@(if no-hostname?
#~("--nohostname") #~("--nohostname")
#~()) #~())
#$@(if long-hostname? #$@(if long-hostname?
#~("--long-hostname") #~("--long-hostname")
#~()) #~())
#$@(if erase-characters #$@(if erase-characters
#~("--erase-chars" #$erase-characters) #~("--erase-chars" #$erase-characters)
#~()) #~())
#$@(if kill-characters #$@(if kill-characters
#~("--kill-chars" #$kill-characters) #~("--kill-chars" #$kill-characters)
#~()) #~())
#$@(if chdir #$@(if chdir
#~("--chdir" #$chdir) #~("--chdir" #$chdir)
#~()) #~())
#$@(if delay #$@(if delay
#~("--delay" #$(number->string delay)) #~("--delay" #$(number->string delay))
#~()) #~())
#$@(if nice #$@(if nice
#~("--nice" #$(number->string nice)) #~("--nice" #$(number->string nice))
#~()) #~())
#$@(if auto-login #$@(if auto-login
(list "--autologin" auto-login) (list "--autologin" auto-login)
'()) '())
#$@(if login-program #$@(if login-program
#~("--login-program" #$login-program) #~("--login-program" #$login-program)
#~()) #~())
#$@(if login-pause? #$@(if login-pause?
#~("--login-pause") #~("--login-pause")
#~()) #~())
defaulted-tty defaulted-tty
#$@(if baud-rate #$@(if baud-rate
#~(#$baud-rate) #~(#$baud-rate)
#~()) #~())
#$@(if term #$@(if term
#~(#$term) #~(#$term)
#~()))) #~())))
(const #f)) ; never start. (const #f)) ; never start.
args)))) args)))))
(stop #~(make-kill-destructor))))))) (stop #~(make-kill-destructor)))))))
(define agetty-service-type (define agetty-service-type