Package: fake-hwclock
Severity: important
Tags: patch

I've just written a manpage for fake-hwclock. Patch containing the manpage is attached

This is my first attempt at writing a manpage so please give constructive criticism.
diff -urN fake-hwclock-0.4/debian/fake-hwclock.manpages fake-hwclock-0.4.new/debian/fake-hwclock.manpages
--- fake-hwclock-0.4/debian/fake-hwclock.manpages	1970-01-01 01:00:00.000000000 +0100
+++ fake-hwclock-0.4.new/debian/fake-hwclock.manpages	2012-04-05 03:00:37.000000000 +0100
@@ -0,0 +1 @@
+fake-hwclock.8
diff -urN fake-hwclock-0.4/debian/rules fake-hwclock-0.4.new/debian/rules
--- fake-hwclock-0.4/debian/rules	2012-03-05 16:30:28.000000000 +0000
+++ fake-hwclock-0.4.new/debian/rules	2012-04-05 02:57:50.000000000 +0100
@@ -29,6 +29,7 @@
 	dh_installdocs
 	dh_installcron
 	dh_installinit --no-start -- start 02 S . stop 02 0 1 6 .
+	dh_installman
 	dh_compress
 	dh_fixperms
 	dh_installdeb
diff -urN fake-hwclock-0.4/fake-hwclock.8 fake-hwclock-0.4.new/fake-hwclock.8
--- fake-hwclock-0.4/fake-hwclock.8	1970-01-01 01:00:00.000000000 +0100
+++ fake-hwclock-0.4.new/fake-hwclock.8	2012-04-05 02:26:20.000000000 +0100
@@ -0,0 +1,57 @@
+.TH FAKE-HWCLOCK 8 "5 April 2012" Debian
+.SH NAME
+fake-hwclock \- Control fake hardware clock
+.SH SYNOPSIS
+\fBfake-hwclock\fP [ \fIcommand\fP ] [ \fBforce\fP ]
+.SH BACKGROUND
+Many embedded Linux systems do not have a functional hardware clock. Either
+they simply don't have a hardware clock at all or they have a hardware clock
+but it is not usable (e.g. because Linux doesn't know how to use it or because
+no battery is present).
+
+This can lead to time moving backwards to some default value (often 1970) when
+the system is rebooted. Since lots of software assumes that time only moves
+forward this is a bad thing. NTP can (and should where practical) be used to
+sync with an external timeserver but it is not available early in the boot
+process and may be unavailable for other reasons.
+.SH DESCRIPTION
+\fBfake-hwclock\fP sets and queries a fake "hardware clock" which stores the
+time in a file. This program may be run by the system administer directly but is
+typically run by init (to load the time on startup and save it on shutdown) 
+and cron (to save the time hourly).
+
+If no command is given then fake-hwclock acts as if the save command was used.
+.SH COMMANDS
+.SS
+.TP
+\fBsave\fP
+Save the time to the file.
+.TP
+\fBload\fP
+Load the time from the file. If force is specified fake-hwclock will move the
+clock either backwards or forwards. Otherwise it will only move it forwards.
+.SH FILES
+.SS
+.TP
+\fB/etc/fake-hwclock.data\fR
+The file used to store the time
+.TP
+\fB/etc/init.d/fake-hwclock\fR
+The init script used to run fake-hwclock on startup and shutdown
+.TP
+\fB/etc/default/fake-hwclock\fR
+Settings file for the init script.
+.TP
+\fB/etc/cron.hourly/fake-hwclock\fR
+Cron job used to save the time hourly
+.SH ENVIRONMENT VARIABLES
+.SS
+.TP
+\fBFILE\fR
+set the file used by fake-hwclock
+.SH RETURN VALUES
+1 is returned for invalid commands. 0 is returned in all other cases.
+.SH BUGS
+This approach can only provide a crude approximation of what a real hardware
+clock provides. Use of NTP or another method to keep the time in sync is 
+strongly advised.

Reply via email to