[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: Revert "services: 'mingetty-service' no longer takes monadic valu
From: |
Ludovic Courtès |
Subject: |
01/01: Revert "services: 'mingetty-service' no longer takes monadic values." |
Date: |
Sun, 13 Sep 2015 10:05:24 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 0081410da011228ce0eef83f50b13bf70932fd3f
Author: Ludovic Courtès <address@hidden>
Date: Sun Sep 13 12:04:55 2015 +0200
Revert "services: 'mingetty-service' no longer takes monadic values."
This reverts commit daa48c31797b27e3a0991d0db7406c951ebc86df.
---
doc/guix.texi | 2 +-
gnu/services/base.scm | 17 ++++++++++++-----
gnu/system/linux.scm | 4 ++--
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 59d60bc..9ae91a8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5699,7 +5699,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 denoting the name
+When true, @var{login-program} is a gexp or a monadic 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 865d461..7f37b3d 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -357,7 +357,7 @@ stopped before 'kill' is called."
(define* (mingetty-service tty
#:key
- (motd (plain-file "motd" "Welcome.\n"))
+ (motd (text-file "motd" "Welcome.\n"))
auto-login
login-program
login-pause?
@@ -374,12 +374,19 @@ 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 denoting the name
+When true, @var{login-program} is a gexp or a monadic 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 file-like object to use as the ``message of the day''."
- (with-monad %store-monad
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))))
(return
(service
(documentation (string-append "Run mingetty on " tty "."))
@@ -854,7 +861,7 @@ gexp, to open it, and evaluate @var{close} to close it."
(define %base-services
;; Convenience variable holding the basic services.
- (let ((motd (plain-file "motd" "
+ (let ((motd (text-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 ac5005e..7461a4a 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, 2015 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014 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 a file-like object used as the message-of-the-day."
+should be the name of a file 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