guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: services: mingetty: Move tty optionality to agetty.


From: Danny Milosavljevic
Subject: 01/01: services: mingetty: Move tty optionality to agetty.
Date: Thu, 15 Feb 2018 06:32:34 -0500 (EST)

dannym pushed a commit to branch master
in repository guix.

commit 7e0a6fac0b4ebffda322eff6e803363ee72a257a
Author: Danny Milosavljevic <address@hidden>
Date:   Thu Feb 15 12:25:36 2018 +0100

    services: mingetty: Move tty optionality to agetty.
    
    Follow-up to 5a9902c8acd63916c6c80cf3c61be6ee814b7e3d.
    
    * gnu/services/base.scm (mingetty-shepherd-service): Move tty optionality 
check to...
    (agetty-shepherd-service): ...here.
---
 gnu/services/base.scm | 242 +++++++++++++++++++++++++-------------------------
 1 file changed, 121 insertions(+), 121 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index e1c6346..1ad7c23 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -944,116 +944,119 @@ to use as the tty.  This is primarily useful for 
headless systems."
          ;; mingetty-shepherd-service).
          (requirement '(user-processes host-name udev))
 
-         (start #~(make-forkexec-constructor
-                    (list #$(file-append util-linux "/sbin/agetty")
-                          address@hidden
-                          #$@(if eight-bits?
-                                 #~("--8bits")
-                                 #~())
-                          #$@(if no-reset?
-                                 #~("--noreset")
-                                 #~())
-                          #$@(if remote?
-                                 #~("--remote")
-                                 #~())
-                          #$@(if flow-control?
-                                 #~("--flow-control")
-                                 #~())
-                          #$@(if host
-                                 #~("--host" #$host)
-                                 #~())
-                          #$@(if no-issue?
-                                 #~("--noissue")
-                                 #~())
-                          #$@(if init-string
-                                 #~("--init-string" #$init-string)
-                                 #~())
-                          #$@(if no-clear?
-                                 #~("--noclear")
-                                 #~())
+         (start #~(let ((tty #$(default-serial-port)))
+                    (if tty
+                        (make-forkexec-constructor
+                         (list #$(file-append util-linux "/sbin/agetty")
+                               address@hidden
+                               #$@(if eight-bits?
+                                      #~("--8bits")
+                                      #~())
+                               #$@(if no-reset?
+                                      #~("--noreset")
+                                      #~())
+                               #$@(if remote?
+                                      #~("--remote")
+                                      #~())
+                               #$@(if flow-control?
+                                      #~("--flow-control")
+                                      #~())
+                               #$@(if host
+                                      #~("--host" #$host)
+                                      #~())
+                               #$@(if no-issue?
+                                      #~("--noissue")
+                                      #~())
+                               #$@(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
 ;;; 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
 ;;; term-ttyS0 service respawns every few seconds.
-                          #$@(if local-line
-                                 #~(#$(match local-line
-                                        ('auto "--local-line=auto")
-                                        ('always "--local-line=always")
-                                        ('never "-local-line=never")))
-                                 #~())
-                          #$@(if tty
-                                 #~()
-                                 #~("--keep-baud"))
-                          #$@(if extract-baud?
-                                 #~("--extract-baud")
-                                 #~())
-                          #$@(if skip-login?
-                                 #~("--skip-login")
-                                 #~())
-                          #$@(if no-newline?
-                                 #~("--nonewline")
-                                 #~())
-                          #$@(if login-options
-                                 #~("--login-options" #$login-options)
-                                 #~())
-                          #$@(if chroot
-                                 #~("--chroot" #$chroot)
-                                 #~())
-                          #$@(if hangup?
-                                 #~("--hangup")
-                                 #~())
-                          #$@(if keep-baud?
-                                 #~("--keep-baud")
-                                 #~())
-                          #$@(if timeout
-                                 #~("--timeout" #$(number->string timeout))
-                                 #~())
-                          #$@(if detect-case?
-                                 #~("--detect-case")
-                                 #~())
-                          #$@(if wait-cr?
-                                 #~("--wait-cr")
-                                 #~())
-                          #$@(if no-hints?
-                                 #~("--nohints?")
-                                 #~())
-                          #$@(if no-hostname?
-                                 #~("--nohostname")
-                                 #~())
-                          #$@(if long-hostname?
-                                 #~("--long-hostname")
-                                 #~())
-                          #$@(if erase-characters
-                                 #~("--erase-chars" #$erase-characters)
-                                 #~())
-                          #$@(if kill-characters
-                                 #~("--kill-chars" #$kill-characters)
-                                 #~())
-                          #$@(if chdir
-                                 #~("--chdir" #$chdir)
-                                 #~())
-                          #$@(if delay
-                                 #~("--delay" #$(number->string delay))
-                                 #~())
-                          #$@(if nice
-                                 #~("--nice" #$(number->string nice))
-                                 #~())
-                          #$@(if auto-login
-                                 (list "--autologin" auto-login)
-                                 '())
-                          #$@(if login-program
-                                 #~("--login-program" #$login-program)
-                                 #~())
-                          #$@(if login-pause?
-                                 #~("--login-pause")
-                                 #~())
-                          #$(or tty (default-serial-port))
-                          #$@(if baud-rate
-                                 #~(#$baud-rate)
-                                 #~())
-                          #$@(if term
-                                 #~(#$term)
-                                 #~()))))
+                               #$@(if local-line
+                                      #~(#$(match local-line
+                                             ('auto "--local-line=auto")
+                                             ('always "--local-line=always")
+                                             ('never "-local-line=never")))
+                                      #~())
+                               #$@(if tty
+                                      #~()
+                                      #~("--keep-baud"))
+                               #$@(if extract-baud?
+                                      #~("--extract-baud")
+                                      #~())
+                               #$@(if skip-login?
+                                      #~("--skip-login")
+                                      #~())
+                               #$@(if no-newline?
+                                      #~("--nonewline")
+                                      #~())
+                               #$@(if login-options
+                                      #~("--login-options" #$login-options)
+                                      #~())
+                               #$@(if chroot
+                                      #~("--chroot" #$chroot)
+                                      #~())
+                               #$@(if hangup?
+                                      #~("--hangup")
+                                      #~())
+                               #$@(if keep-baud?
+                                      #~("--keep-baud")
+                                      #~())
+                               #$@(if timeout
+                                      #~("--timeout" #$(number->string 
timeout))
+                                      #~())
+                               #$@(if detect-case?
+                                      #~("--detect-case")
+                                      #~())
+                               #$@(if wait-cr?
+                                      #~("--wait-cr")
+                                      #~())
+                               #$@(if no-hints?
+                                      #~("--nohints?")
+                                      #~())
+                               #$@(if no-hostname?
+                                      #~("--nohostname")
+                                      #~())
+                               #$@(if long-hostname?
+                                      #~("--long-hostname")
+                                      #~())
+                               #$@(if erase-characters
+                                      #~("--erase-chars" #$erase-characters)
+                                      #~())
+                               #$@(if kill-characters
+                                      #~("--kill-chars" #$kill-characters)
+                                      #~())
+                               #$@(if chdir
+                                      #~("--chdir" #$chdir)
+                                      #~())
+                               #$@(if delay
+                                      #~("--delay" #$(number->string delay))
+                                      #~())
+                               #$@(if nice
+                                      #~("--nice" #$(number->string nice))
+                                      #~())
+                               #$@(if auto-login
+                                      (list "--autologin" auto-login)
+                                      '())
+                               #$@(if login-program
+                                      #~("--login-program" #$login-program)
+                                      #~())
+                               #$@(if login-pause?
+                                      #~("--login-pause")
+                                      #~())
+                               #$(or tty (default-serial-port))
+                               #$@(if baud-rate
+                                      #~(#$baud-rate)
+                                      #~())
+                               #$@(if term
+                                      #~(#$term)
+                                      #~()))))
+                        (const #f))) ; never start.
          (stop #~(make-kill-destructor)))))))
 
 (define agetty-service-type
@@ -1096,21 +1099,18 @@ the tty to run, among other things."
        ;; text is not lost in the middle of kernel messages (XXX).
        (requirement '(user-processes host-name udev))
 
-       (start  #~(let ((tty #$(default-serial-port)))
-                   (if tty
-                       (make-forkexec-constructor
-                        (list #$(file-append mingetty "/sbin/mingetty")
-                              "--noclear" #$tty
-                              #$@(if auto-login
-                                     #~("--autologin" #$auto-login)
-                                     #~())
-                              #$@(if login-program
-                                     #~("--loginprog" #$login-program)
-                                     #~())
-                              #$@(if login-pause?
-                                     #~("--loginpause")
-                                     #~())))
-                       (const #f)))) ; never start.
+       (start  #~(make-forkexec-constructor
+                  (list #$(file-append mingetty "/sbin/mingetty")
+                        "--noclear" #$tty
+                        #$@(if auto-login
+                               #~("--autologin" #$auto-login)
+                               #~())
+                        #$@(if login-program
+                               #~("--loginprog" #$login-program)
+                               #~())
+                        #$@(if login-pause?
+                               #~("--loginpause")
+                               #~()))))
        (stop   #~(make-kill-destructor)))))))
 
 (define mingetty-service-type



reply via email to

[Prev in Thread] Current Thread [Next in Thread]