From 43a2779876c5ae170f3c6edc7f3d605997c4ec05 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 25 Sep 2013 21:47:10 +0200 Subject: gnu: vm: Add /etc/issue and a motd. * gnu/system/vm.scm (system-qemu-image): Build a 'motd' and an 'issue' file. Pass 'unix-pam-service' that motd. Have /etc/issue point to the 'issue' file. --- gnu/system/linux.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gnu/system/linux.scm') diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm index b2daa13e06..6aebe159ba 100644 --- a/gnu/system/linux.scm +++ b/gnu/system/linux.scm @@ -125,9 +125,10 @@ (let ((unix (pam-entry (control "required") (module "pam_unix.so")))) - (lambda* (name #:key allow-empty-passwords?) + (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." +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." ;; See . (let ((name* name)) (pam-service @@ -140,6 +141,12 @@ ALLOW-EMPTY-PASSWORDS? is true, allow empty passwords." (arguments '("nullok"))) unix))) (password (list unix)) - (session (list unix))))))) + (session (if motd + (list unix + (pam-entry + (control "optional") + (module "pam_motd.so") + (arguments (list (string-append "motd=" motd))))) + (list unix)))))))) ;;; linux.scm ends here -- cgit v1.2.3