summaryrefslogtreecommitdiff
path: root/gnu/system/vm.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-25 21:47:10 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-25 21:47:10 +0200
commit43a2779876c5ae170f3c6edc7f3d605997c4ec05 (patch)
tree5c4d6838f5539f9e61037ad5e13f8d8e985fc4d8 /gnu/system/vm.scm
parentd09cb44967e6ee6266ea1a0e566c78a39dc26830 (diff)
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.
Diffstat (limited to 'gnu/system/vm.scm')
-rw-r--r--gnu/system/vm.scm27
1 files changed, 24 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index a0669ae865..e79a4257de 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -432,10 +432,18 @@ input tuples."
(define (system-qemu-image store)
"Return the derivation of a QEMU image of the GNU system."
+ (define motd
+ (add-text-to-store store "motd" "
+Happy birthday, GNU! http://www.gnu.org/gnu30
+
+"))
+
(define %pam-services
;; Services known to PAM.
(list %pam-other-services
- (unix-pam-service "login" #:allow-empty-passwords? #t)))
+ (unix-pam-service "login"
+ #:allow-empty-passwords? #t
+ #:motd motd)))
(define %dmd-services
;; Services run by dmd.
@@ -487,6 +495,16 @@ alias ls='ls -p --color'
alias ll='ls -l'
")))
+ (issue (add-text-to-store store "issue" "
+This is an alpha preview of the GNU system. Welcome.
+
+This image features the GNU Guix package manager, which was used to
+build it (http://www.gnu.org/software/guix/). The init system is
+GNU dmd (http://www.gnu.org/software/dmd/).
+
+You can log in as 'root' with no password.
+"))
+
(populate `((directory "/etc")
(directory "/var/log")
(directory "/var/run")
@@ -494,7 +512,8 @@ alias ll='ls -l'
("/etc/passwd" -> ,passwd)
("/etc/login.defs" -> "/dev/null")
("/etc/pam.d" -> ,pam.d)
- ("/etc/profile" -> ,bashrc)))
+ ("/etc/profile" -> ,bashrc)
+ ("/etc/issue" -> ,issue)))
(out (derivation->output-path
(package-derivation store mingetty)))
(boot (add-text-to-store store "boot"
@@ -525,11 +544,13 @@ alias ll='ls -l'
;; Configuration.
("dmd.conf" ,dmd-conf)
- ("etc-pam.d" ,pam.d)
+ ("etc-pam.d" ,pam.d-drv)
("etc-passwd" ,passwd)
("etc-shadow" ,shadow)
("etc-group" ,group)
("etc-bashrc" ,bashrc)
+ ("etc-issue" ,issue)
+ ("etc-motd" ,motd)
,@(append-map service-inputs
%dmd-services))))))