NetBSD Problem Report #48944
From www@NetBSD.org Tue Jun 24 08:21:33 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 7E4DAA5D59
for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Jun 2014 08:21:33 +0000 (UTC)
Message-Id: <20140624082132.129B3A6545@mollari.NetBSD.org>
Date: Tue, 24 Jun 2014 08:21:32 +0000 (UTC)
From: hiramatsu@NetBSD.org
Reply-To: hiramatsu@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: cron ignores '?' (question mark) time field
X-Send-Pr-Version: www-1.0
>Number: 48944
>Category: bin
>Synopsis: cron ignores '?' (question mark) time field
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 24 08:25:00 +0000 2014
>Closed-Date: Wed Jun 25 05:13:50 +0000 2014
>Last-Modified: Thu Aug 07 06:25:00 +0000 2014
>Originator: Hiramatsu Yoshifumi
>Release: NetBSD 6.0.1
>Organization:
>Environment:
NetBSD onamae-vps.jgoamakf.info 6.0.1 NetBSD 6.0.1 (GENERIC) amd64
>Description:
man page of crontab (man 5 crontab) says
-----------------------
A field may begin with a question mark (`?'), which indicates a single
value randomly selected when the crontab file is read.
-----------------------
However, when I entered following line, cron ignores it
? 12 * * * /home/scripts/backup.sh
>How-To-Repeat:
Use question mark for time field of crontab.
>Fix:
In src/external/bsd/cron/dist.entry.c, else if block for '?' is
empty due to duplicate line(probably merge error?).
RCS file: /cvsroot/src/external/bsd/cron/dist/entry.c,v
retrieving revision 1.4
diff -b -u -r1.4 entry.c
--- dist/entry.c 15 Jul 2010 20:03:28 -0000 1.4
+++ dist/entry.c 24 Jun 2014 08:02:03 -0000
@@ -479,7 +479,6 @@
if (ch == EOF)
return (EOF);
} else if (ch == '?') {
- } else if (ch == '?') {
qmark = TRUE;
ch = get_char(file);
if (ch == EOF)
>Release-Note:
>Audit-Trail:
From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48944 CVS commit: src/external/bsd/cron/dist
Date: Tue, 24 Jun 2014 09:17:54 +0000
Module Name: src
Committed By: skrll
Date: Tue Jun 24 09:17:54 UTC 2014
Modified Files:
src/external/bsd/cron/dist: entry.c
Log Message:
PR/48944: cron ignores '?' (question mark) time field
Fix the obvious merge botch.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/cron/dist/entry.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 24 Jun 2014 10:00:30 +0000
State-Changed-Why:
skrll committed a fix -- does it work for you?
From: hiramatsu@NetBSD.org
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, wiz@NetBSD.org
Subject: Re: bin/48944 (cron ignores '?' (question mark) time field)
Date: Wed, 25 Jun 2014 09:54:09 +0900
I confirmed that cron recognizes '?', so the problem is fixed now.
Please close this PR.
At Tue, 24 Jun 2014 10:00:30 +0000 (UTC),
wiz@NetBSD.org wrote:
>
> Synopsis: cron ignores '?' (question mark) time field
>
> State-Changed-From-To: open->feedback
> State-Changed-By: wiz@NetBSD.org
> State-Changed-When: Tue, 24 Jun 2014 10:00:30 +0000
> State-Changed-Why:
> skrll committed a fix -- does it work for you?
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 25 Jun 2014 05:13:50 +0000
State-Changed-Why:
confirmed fixed, thanks
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48944 CVS commit: [netbsd-6] src/external/bsd/cron/dist
Date: Thu, 7 Aug 2014 06:22:35 +0000
Module Name: src
Committed By: msaitoh
Date: Thu Aug 7 06:22:35 UTC 2014
Modified Files:
src/external/bsd/cron/dist [netbsd-6]: entry.c
Log Message:
Pull up following revision(s) (requested by skrll in ticket #1087):
external/bsd/cron/dist/entry.c: revision 1.5
PR/48944: cron ignores '?' (question mark) time field
Fix the obvious merge botch.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.8.1 src/external/bsd/cron/dist/entry.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.