As suggested by Tom at [1], I'm sending this patch here (see
attachment). Please proof-read and give comments.

Cheers,
Elvis

[1] https://bugs.archlinux.org/task/25269
From 2a7c154db87ce92c825802507d6e74762a344df1 Mon Sep 17 00:00:00 2001
From: Elvis Stansvik <[email protected]>
Date: Wed, 27 Jul 2011 12:06:18 +0200
Subject: [PATCH] Add manpage for rc.d script.

---
 Makefile   |   13 +++++++++--
 rc.d.8.txt |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 3 deletions(-)
 create mode 100644 rc.d.8.txt

diff --git a/Makefile b/Makefile
index 9fd2347..4c850c2 100644
--- a/Makefile
+++ b/Makefile
@@ -8,27 +8,34 @@ DIRS := \
 	/usr/lib/tmpfiles.d \
 	/usr/lib/initscripts \
 	/etc/bash_completion.d \
-	/usr/share/zsh/site-functions
+	/usr/share/zsh/site-functions \
+	/usr/share/man/man8
 
 minilogd: minilogd.o
 
 installdirs:
 	install -dm755 $(foreach DIR, $(DIRS), $(DESTDIR)$(DIR))
 
-install: minilogd installdirs
+install: minilogd installdirs doc
 	install -m644 -t $(DESTDIR)/etc inittab rc.conf
 	install -m755 -t $(DESTDIR)/etc rc.local rc.local.shutdown rc.multi rc.shutdown rc.single rc.sysinit
 	install -m644 -t $(DESTDIR)/etc/logrotate.d bootlog
 	install -m644 -t $(DESTDIR)/etc/rc.d functions
 	install -m755 -t $(DESTDIR)/etc/rc.d hwclock network netfs
 	install -m755 -t $(DESTDIR)/sbin minilogd rc.d
+	install -m644 -t ${DESTDIR}/usr/share/man/man8 rc.d.8
 	install -m755 -t $(DESTDIR)/usr/lib/initscripts arch-tmpfiles
 	install -m644 tmpfiles.conf $(DESTDIR)/usr/lib/tmpfiles.d/arch.conf
 	install -m644 -T bash-completion $(DESTDIR)/etc/bash_completion.d/rc.d
 	install -m644 -T zsh-completion $(DESTDIR)/usr/share/zsh/site-functions/_rc.d
 
+rc.d.8: rc.d.8.txt
+	a2x -d manpage -f manpage rc.d.8.txt
+
+doc: rc.d.8
+
 clean:
-	rm -f minilogd minilogd.o
+	rm -f minilogd minilogd.o rc.d.8
 
 release:
 	git archive HEAD --prefix=initscripts-$(VER)/ | xz > initscripts-$(VER).tar.xz
diff --git a/rc.d.8.txt b/rc.d.8.txt
new file mode 100644
index 0000000..2b5a25b
--- /dev/null
+++ b/rc.d.8.txt
@@ -0,0 +1,65 @@
+/////
+vim:set ts=4 sw=4 syntax=asciidoc noet:
+/////
+rc.d(8)
+=======
+
+Name
+----
+rc.d - Control and list daemons
+
+Synopsis
+--------
+*rc.d (action daemon...|list|help)*
+
+Description
+-----------
+The *rc.d* script controls and lists daemons on the system. An action may be
+invoked on one or more daemons using *rc.d action daemon...*. See <<A,Actions>>
+below for more information. Use *rc.d list* to get the status of all daemons on
+the system.
+
+Actions[[A]]
+------------
+The actions supported by a daemon may be different from daemon to daemon, but
+commonly supported actions include
+
+*start*::
+	Starts the daemon if it's not already running.
+
+*stop*::
+	Stops a running daemon.
+
+*restart*::
+	Restarts a running daemon.
+
+More uncommon actions are
+
+*reload*::
+	Signals the daemon to reload its configuration.
+
+*status*::
+	Shows the status of the daemon.
+
+Examples
+--------
+*rc.d stop crond*::
+	Stops the *crond* daemon.
+
+*rc.d start crond cupsd*::
+	Starts the *crond* and *cupsd* daemon.
+
+*rc.d restart crond*::
+	Restarts the *crond* daemon.
+
+*rc.d list*::
+	List all daemons and their status.
+
+Files
+-----
+'/etc/rc.d'::
+	Directory containing available daemons on the system.
+
+Authors
+-------
+*rc.d* is created by the Arch Linux Developer community.
-- 
1.7.6

Reply via email to