aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-27 22:39:07 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-28 00:15:07 +0100
commitb4f0bb1771b192a559ee95560bfe553034c7e233 (patch)
treec64928d30b099ffd6a9c1e1f6dda5130b67c4f57 /gnu/system
parentb455a1186862589876e2bb03d702738e8b28a616 (diff)
downloadpatches-b4f0bb1771b192a559ee95560bfe553034c7e233.tar
patches-b4f0bb1771b192a559ee95560bfe553034c7e233.tar.gz
gnu: dmd: Add service documentation.
* gnu/system/dmd.scm (<service>): Add 'documentation' field. (host-name-service, mingetty-service, nscd-service, syslog-service, static-networking-service): Provide a 'documentation' value. (dmd-configuration-file): Use it.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/dmd.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/system/dmd.scm b/gnu/system/dmd.scm
index 946b6a7937..1529b47cb6 100644
--- a/gnu/system/dmd.scm
+++ b/gnu/system/dmd.scm
@@ -59,6 +59,8 @@
(define-record-type* <service>
service make-service
service?
+ (documentation service-documentation ; string
+ (default "[No documentation.]"))
(provision service-provision) ; list of symbols
(requirement service-requirement ; list of symbols
(default '()))
@@ -74,6 +76,7 @@
"Return a service that sets the host name to NAME."
(with-monad %store-monad
(return (service
+ (documentation "Initialize the machine's host name.")
(provision '(host-name))
(start `(lambda _
(sethostname ,name)))
@@ -84,6 +87,7 @@
(mlet %store-monad ((mingetty-bin (package-file mingetty "sbin/mingetty")))
(return
(service
+ (documentation (string-append "Run mingetty on " tty "."))
(provision (list (symbol-append 'term- (string->symbol tty))))
;; Since the login prompt shows the host name, wait for the 'host-name'
@@ -97,6 +101,7 @@
"Return a service that runs libc's name service cache daemon (nscd)."
(mlet %store-monad ((nscd (package-file glibc "sbin/nscd")))
(return (service
+ (documentation "Run libc's name service cache daemon (nscd).")
(provision '(nscd))
(start `(make-forkexec-constructor ,nscd "-f" "/dev/null"))
@@ -140,6 +145,7 @@
(syslogd (package-file inetutils "libexec/syslogd")))
(return
(service
+ (documentation "Run the syslog daemon (syslogd).")
(provision '(syslogd))
(start `(make-forkexec-constructor ,syslogd
"--rcfile" ,syslog.conf))
@@ -171,6 +177,9 @@ true, it must be a string specifying the default network gateway."
(route (package-file net-tools "sbin/route")))
(return
(service
+ (documentation
+ (string-append "Set up networking on the '" interface
+ "' interface using a static IP address."))
(provision '(networking))
(start `(lambda _
(and (zero? (system* ,ifconfig ,interface ,ip "up"))
@@ -196,8 +205,10 @@ true, it must be a string specifying the default network gateway."
`(begin
(register-services
,@(map (match-lambda
- (($ <service> provision requirement respawn? start stop)
+ (($ <service> documentation provision requirement
+ respawn? start stop)
`(make <service>
+ #:docstring ,documentation
#:provides ',provision
#:requires ',requirement
#:respawn? ,respawn?