guix-commits
[Top][All Lists]
Advanced

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

01/03: services: 'mingetty-service' no longer takes monadic values.


From: Ludovic Courtès
Subject: 01/03: services: 'mingetty-service' no longer takes monadic values.
Date: Tue, 08 Sep 2015 22:02:30 +0000

civodul pushed a commit to branch wip-service-refactor
in repository guix.

commit 7dfa9663d84139562180edd45c1d31a94e033648
Author: Ludovic Courtès <address@hidden>
Date:   Mon Sep 7 22:44:26 2015 +0200

    services: 'mingetty-service' no longer takes monadic values.
    
    * gnu/services/base.scm (mingetty-service): Change default value of
      #:motd from a monadic value to a <plain-file>.  Assume MOTD to be a
      file-like object.  Assume LOGIN-PROGRAM is a gexp or #f.
      (%base-services): Use 'plain-file' instead of 'text-file' for motd.
    * gnu/system/linux.scm (unix-pam-service): Update docstring to mention
      that MOTD is a file-like object.
    * doc/guix.texi (Base Services): Adjust 'mingetty-service' documentation
      accordingly.
---
 doc/guix.texi         |    2 +-
 gnu/services/base.scm |   17 +++++------------
 gnu/system/linux.scm  |    4 ++--
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f943540..a63e051 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5687,7 +5687,7 @@ automatically.  @var{login-pause?} can be set to 
@code{#t} in conjunction with
 @var{auto-login}, in which case the user will have to press a key before the
 login shell is launched.
 
-When true, @var{login-program} is a gexp or a monadic gexp denoting the name
+When true, @var{login-program} is a gexp denoting the name
 of the log-in program (the default is the @code{login} program from the Shadow
 tool suite.)
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 888e446..75b1698 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -356,7 +356,7 @@ stopped before 'kill' is called."
 
 (define* (mingetty-service tty
                            #:key
-                           (motd (text-file "motd" "Welcome.\n"))
+                           (motd (plain-file "motd" "Welcome.\n"))
                            auto-login
                            login-program
                            login-pause?
@@ -373,19 +373,12 @@ automatically.  @var{login-pause?} can be set to 
@code{#t} in conjunction with
 @var{auto-login}, in which case the user will have to press a key before the
 login shell is launched.
 
-When true, @var{login-program} is a gexp or a monadic gexp denoting the name
+When true, @var{login-program} is a gexp denoting the name
 of the log-in program (the default is the @code{login} program from the Shadow
 tool suite.)
 
address@hidden is a monadic value containing a text file to use as
-the ``message of the day''."
-  (mlet %store-monad ((motd motd)
-                      (login-program (cond ((gexp? login-program)
-                                            (return login-program))
-                                           ((not login-program)
-                                            (return #f))
-                                           (else
-                                            login-program))))
address@hidden is a file-like object to use as the ``message of the day''."
+  (with-monad %store-monad
     (return
      (service
       (documentation (string-append "Run mingetty on " tty "."))
@@ -860,7 +853,7 @@ gexp, to open it, and evaluate @var{close} to close it."
 
 (define %base-services
   ;; Convenience variable holding the basic services.
-  (let ((motd (text-file "motd" "
+  (let ((motd (plain-file "motd" "
 This is the GNU operating system, welcome!\n\n")))
     (list (console-font-service "tty1")
           (console-font-service "tty2")
diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index 7461a4a..ac5005e 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -136,7 +136,7 @@ dumped in /etc/pam.d/NAME, where NAME is the name of 
SERVICE."
     (lambda* (name #:key allow-empty-passwords? motd)
       "Return a standard Unix-style PAM service for NAME.  When
 ALLOW-EMPTY-PASSWORDS? is true, allow empty passwords.  When MOTD is true, it
-should be the name of a file used as the message-of-the-day."
+should be a file-like object used as the message-of-the-day."
       ;; See 
<http://www.linux-pam.org/Linux-PAM-html/sag-configuration-example.html>.
       (let ((name* name))
         (pam-service



reply via email to

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