Bug 45493

Summary: Confusing comment in /etc/crontab
Product: Base System Reporter: Kevin Oberman <oberman>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.7-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Kevin Oberman 2002-11-19 21:20:01 UTC
	The comment for the adjkerntz entry in /etc/crontab is not
clear. The comma usage makes it unclear which cadse is the accepted
and which is rejected.

How-To-Repeat: 	Not applicable.
Comment 1 Bruce Evans 2002-11-20 06:47:26 UTC
On Tue, 19 Nov 2002, Kevin Oberman wrote:

> >Description:
> 	The comment for the adjkerntz entry in /etc/crontab is not
> clear. The comma usage makes it unclear which cadse is the accepted
> and which is rejected.
> >How-To-Repeat:
> 	Not applicable.
> >Fix:
>
> --- crontab	Mon Jun 10 21:20:09 2002
> +++ crontab.new	Tue Nov 19 13:14:47 2002
> @@ -19,6 +19,6 @@
>  30	5	1	*	*	root	periodic monthly
>  #
>  # time zone change adjustment for wall cmos clock,
> -# does nothing, if you have UTC cmos clock.
> +# does nothing if you have UTC cmos clock.
>  # See adjkerntz(8) for details.
>  1,31	0-5	*	*	*	root	adjkerntz -a

Something should be done about the first comma too.  crontab is apparently
supposed to be written in non-English with all "sentences" in comments not
beginning with a capital letter and not ending with a period, but the
comment about adjkerntz violates this by using bad English (a comma splice)
in its first line, the stray comma and a period in its second line, and
actual English in its last line.

Bruce
Comment 2 Tom Hukins freebsd_committer freebsd_triage 2002-11-21 11:42:56 UTC
I'd appreciate your feedback on this patch which fixes the ambiguous
adjkerntz(8) statement in /etc/crontab and generally tidies up the
grammar used in comments.

Thanks,
Tom

Index: crontab
===================================================================
RCS file: /home/ncvs/src/etc/crontab,v
retrieving revision 1.31
diff -u -r1.31 crontab
--- crontab	19 Feb 2001 02:47:41 -0000	1.31
+++ crontab	21 Nov 2002 10:09:19 -0000
@@ -10,18 +10,17 @@
 #
 */5	*	*	*	*	root	/usr/libexec/atrun
 #
-# save some entropy so that /dev/random can reseed on boot
+# Save some entropy so that /dev/random can reseed on boot.
 */11	*	*	*	*	operator /usr/libexec/save-entropy
 #
-# rotate log files every hour, if necessary
+# Rotate log files every hour, if necessary.
 0	*	*	*	*	root	newsyslog
 #
-# do daily/weekly/monthly maintenance
+# Perform daily/weekly/monthly maintenance.
 1	3	*	*	*	root	periodic daily
 15	4	*	*	6	root	periodic weekly
 30	5	1	*	*	root	periodic monthly
 #
-# time zone change adjustment for wall cmos clock,
-# does nothing, if you have UTC cmos clock.
-# See adjkerntz(8) for details.
+# Timezone adjustment for wall CMOS clock.  Does nothing for UTC CMOS
+# clock.  See adjkerntz(8) for details.
 1,31	0-5	*	*	*	root	adjkerntz -a
Comment 3 Giorgos Keramidas freebsd_committer freebsd_triage 2002-11-21 12:29:13 UTC
On 2002-11-21 03:50, Tom Hukins <tom@FreeBSD.org> wrote:
> I'd appreciate your feedback on this patch which fixes the ambiguous
> adjkerntz(8) statement in /etc/crontab and generally tidies up the
> grammar used in comments.

It looks fine, except for one minor detail.  The following is still a
bit strange, since "Does nothing for UTC CMOS clock." is not a valid,
complete sentence.

>  +# Timezone adjustment for wall CMOS clock.  Does nothing for UTC CMOS
>  +# clock.  See adjkerntz(8) for details.

"This does nothing..."
"It does nothing..."
"adjkerntz(8) does nothing..."

You can pick whichever you like :)
Comment 4 Tom Hukins freebsd_committer freebsd_triage 2002-11-21 13:02:57 UTC
On Thu, Nov 21, 2002 at 02:29:13PM +0200, Giorgos Keramidas wrote:
> On 2002-11-21 03:50, Tom Hukins <tom@FreeBSD.org> wrote:
> 
> The following is still a bit strange, since "Does nothing for UTC
> CMOS clock." is not a valid, complete sentence.
> 
> >  +# Timezone adjustment for wall CMOS clock.  Does nothing for UTC CMOS
> >  +# clock.  See adjkerntz(8) for details.

Yes, on reflection "Adjust the time zone only if the CMOS clock keeps
local time.  See adjkerntz(8) for details." seems clearer to me.

Tom
Comment 5 Ceri Davies freebsd_committer freebsd_triage 2002-11-21 13:16:10 UTC
On Thu, Nov 21, 2002 at 05:10:05AM -0800, Tom Hukins wrote:

>  Yes, on reflection "Adjust the time zone only if the CMOS clock keeps
>  local time.  See adjkerntz(8) for details." seems clearer to me.

What other time does it keep? ;)

"Adjust the time zone only if local time is kept by the CMOS clock" ?

Ceri
-- 
By the gems of the blood, you shall meet your end!
Comment 6 Tom Hukins freebsd_committer freebsd_triage 2002-11-21 13:29:40 UTC
On Thu, Nov 21, 2002 at 01:16:10PM +0000, Ceri Davies wrote:
> On Thu, Nov 21, 2002 at 05:10:05AM -0800, Tom Hukins wrote:
> 
> >  Yes, on reflection "Adjust the time zone only if the CMOS clock keeps
> >  local time.  See adjkerntz(8) for details." seems clearer to me.
> 
> What other time does it keep? ;)

"Adjust the time zone if the CMOS clock keeps local time, as opposed
to UTC time."

Third time lucky?

Tom
Comment 7 Giorgos Keramidas freebsd_committer freebsd_triage 2002-11-21 13:30:58 UTC
On 2002-11-21 05:20, Ceri Davies <ceri@FreeBSD.ORG> wrote:
> On Thu, Nov 21, 2002 at 05:10:05AM -0800, Tom Hukins wrote:
> >  Yes, on reflection "Adjust the time zone only if the CMOS clock keeps
> >  local time.  See adjkerntz(8) for details." seems clearer to me.
>
> What other time does it keep? ;)

UTC obviously.

> "Adjust the time zone only if local time is kept by the CMOS clock" ?

This is equivalent to the one Tom suggested.  It doesn't add or remove
anything to the meaning.  It also uses a passive form that is sometimes
considered to be bad style :p

If the comment needs to describe two cases, there should be two
simpler sentences instead of one that doesn't quite cut it.  I'd
probably prefer this written as:

# Adjust the time zone.  See adjkerntz(8) for details.  If your CMOS
# clock is set to UTC instead of the local time, this does nothing.
Comment 8 Ceri Davies freebsd_committer freebsd_triage 2002-11-21 13:44:39 UTC
On Thu, Nov 21, 2002 at 05:40:04AM -0800, Giorgos Keramidas wrote:
> The following reply was made to PR misc/45493; it has been noted by GNATS.
> 
>  On 2002-11-21 05:20, Ceri Davies <ceri@FreeBSD.ORG> wrote:
>  > On Thu, Nov 21, 2002 at 05:10:05AM -0800, Tom Hukins wrote:
>  > >  Yes, on reflection "Adjust the time zone only if the CMOS clock keeps
>  > >  local time.  See adjkerntz(8) for details." seems clearer to me.
>  >
>  > What other time does it keep? ;)
>  
>  UTC obviously.

OK, you got me.

>  If the comment needs to describe two cases, there should be two
>  simpler sentences instead of one that doesn't quite cut it.  I'd
>  probably prefer this written as:
>  
>  # Adjust the time zone.  See adjkerntz(8) for details.  If your CMOS
>  # clock is set to UTC instead of the local time, this does nothing.

Good.

Ceri
-- 
The stalwart Urgrosh has come!
Comment 9 Kevin Oberman 2002-11-21 14:04:59 UTC
> Date: Thu, 21 Nov 2002 11:42:56 +0000
> From: Tom Hukins <tom@FreeBSD.org>
> 
> I'd appreciate your feedback on this patch which fixes the ambiguous
> adjkerntz(8) statement in /etc/crontab and generally tidies up the
> grammar used in comments.
> 
> Thanks,
> Tom

I'd suggest one extremely minor change. If you can't spot it, I
hyphenated te word "re-seed".

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

Index: crontab
===================================================================
RCS file: /home/ncvs/src/etc/crontab,v
retrieving revision 1.31
diff -u -r1.31 crontab
--- crontab	19 Feb 2001 02:47:41 -0000	1.31
+++ crontab	21 Nov 2002 14:03:42 -0000
@@ -10,18 +10,17 @@
 #
 */5	*	*	*	*	root	/usr/libexec/atrun
 #
-# save some entropy so that /dev/random can reseed on boot
+# Save some entropy so that /dev/random can re-seed on boot.
 */11	*	*	*	*	operator /usr/libexec/save-entropy
 #
-# rotate log files every hour, if necessary
+# Rotate log files every hour, if necessary.
 0	*	*	*	*	root	newsyslog
 #
-# do daily/weekly/monthly maintenance
+# Perform daily/weekly/monthly maintenance.
 1	3	*	*	*	root	periodic daily
 15	4	*	*	6	root	periodic weekly
 30	5	1	*	*	root	periodic monthly
 #
-# time zone change adjustment for wall cmos clock,
-# does nothing, if you have UTC cmos clock.
-# See adjkerntz(8) for details.
+# Timezone adjustment for wall CMOS clock.  Does nothing for UTC CMOS
+# clock.  See adjkerntz(8) for details.
 1,31	0-5	*	*	*	root	adjkerntz -a
Comment 10 Tom Hukins freebsd_committer freebsd_triage 2002-11-22 16:17:04 UTC
State Changed
From-To: open->closed

I have clarified the adjkerntz(8) comment in revision 1.32 of /etc/crontab.