aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-07 22:44:26 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-10 22:46:14 +0200
commitce8a6dfc43265787c23fb93d3877fbcacb0451e4 (patch)
tree97371c59b467d361d5c2b3b82864c9e8300f4d31
parentb751cde36b508690d5f893360f964d3098549131 (diff)
downloadpatches-ce8a6dfc43265787c23fb93d3877fbcacb0451e4.tar
patches-ce8a6dfc43265787c23fb93d3877fbcacb0451e4.tar.gz
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. * gnu/system/install.scm (installation-services): Adjust accordingly. (log-to-info): Use 'program-file' instead of 'gexp->script'.
-rw-r--r--doc/guix.texi2
-rw-r--r--gnu/services/base.scm17
-rw-r--r--gnu/system/install.scm4
-rw-r--r--gnu/system/linux.scm4
4 files changed, 10 insertions, 17 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 6334b37a7f..d5c5ffd8cc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5764,7 +5764,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 7f37b3da00..865d461a1e 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 (text-file "motd" "Welcome.\n"))
+ (motd (plain-file "motd" "Welcome.\n"))
auto-login
login-program
login-pause?
@@ -374,19 +374,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.)
-@var{motd} 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))))
+@var{motd} 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 "."))
@@ -861,7 +854,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/install.scm b/gnu/system/install.scm
index c161526d77..dc5a47a293 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -102,7 +102,7 @@ under /root/.guix-profile where GUIX is installed."
(define (log-to-info)
"Return a script that spawns the Info reader on the right section of the
manual."
- (gexp->script "log-to-info"
+ (program-file "log-to-info"
#~(begin
;; 'gunzip' is needed to decompress the doc.
(setenv "PATH" (string-append #$gzip "/bin"))
@@ -234,7 +234,7 @@ configuration template file in the installation system."
(define (installation-services)
"Return the list services for the installation image."
- (let ((motd (text-file "motd" "
+ (let ((motd (plain-file "motd" "
Welcome to the installation of the Guix System Distribution!
There is NO WARRANTY, to the extent permitted by law. In particular, you may
diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index 7461a4a61f..ac5005ebd1 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 <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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