From owner-freebsd-bugs Mon Jan 15 12:20:29 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 95E5237B699 for ; Mon, 15 Jan 2001 12:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0FKK2B07618; Mon, 15 Jan 2001 12:20:02 -0800 (PST) (envelope-from gnats) Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 4876B37B698 for ; Mon, 15 Jan 2001 12:19:29 -0800 (PST) Received: (qmail 6184 invoked by uid 0); 15 Jan 2001 20:19:27 -0000 Received: from p3ee2166d.dip.t-dialin.net (HELO speedy.gsinet) (62.226.22.109) by mail.gmx.net (mp004-rz3) with SMTP; 15 Jan 2001 20:19:27 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id TAA09309 for FreeBSD-gnats-submit@freebsd.org; Mon, 15 Jan 2001 19:46:03 +0100 Message-Id: <20010115194603.Y253@speedy.gsinet> Date: Mon, 15 Jan 2001 19:46:03 +0100 From: Gerhard Sittig To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: conf/24358: [PATCH] etc/rc variables for cron(8) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24358 >Category: conf >Synopsis: [PATCH] etc/rc variables for cron(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 15 12:20:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Gerhard Sittig >Release: FreeBSD 4.2-STABLE i386 >Organization: in private >Environment: any FreeBSD system with cron(8) invocation in /etc/rc >Description: Currently it's neither possible to pass command line options to the cron daemon nor can one choose which cron executable to run. Although public discussion proves that there are different preferences among users as well as a certain wish to escape from fixed values (while preserving current behaviour as a default). >How-To-Repeat: Try to tell your FreeBSD system to run a different cron program or to pass (e.g. some "-x KEY") command line parameters to it without touching /etc/rc. It's only possible by setting "cron_enable=NO" and introducing a new /usr/local/etc/rc.d script. Which in turn might ask for another config file ... >Fix: Apply the following patch which introduces two new rc.conf variables named "cron_program" and "cron_flags". The manpage wording is copied over from the named section. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # cronvars.diff # echo x - cronvars.diff sed 's/^X//' >cronvars.diff << 'END-of-cronvars.diff' XIndex: etc/rc X=================================================================== XRCS file: /CVSREPO/fbsd/src/etc/rc,v Xretrieving revision 1.240 Xdiff -u -u -r1.240 rc X--- etc/rc 2000/11/21 04:21:54 1.240 X+++ etc/rc 2001/01/15 19:11:53 X@@ -502,7 +502,7 @@ X [Nn][Oo]) X ;; X *) X- echo -n ' cron'; cron X+ echo -n ' cron'; ${cron_program:-cron} ${cron_flags} X ;; X esac X XIndex: etc/defaults/rc.conf X=================================================================== XRCS file: /CVSREPO/fbsd/src/etc/defaults/rc.conf,v Xretrieving revision 1.83 Xdiff -u -u -r1.83 rc.conf X--- etc/defaults/rc.conf 2000/10/29 19:59:04 1.83 X+++ etc/defaults/rc.conf 2001/01/15 18:53:03 X@@ -295,6 +295,8 @@ X ############################################################## X X cron_enable="YES" # Run the periodic job daemon. X+cron_program="cron" # Which cron executable to run (if enabled). X+cron_flags="" # Which options to pass to the cron daemon. X lpd_enable="NO" # Run the line printer daemon. X lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. X lpd_flags="" # Flags to lpd (if enabled). XIndex: share/man/man5/rc.conf.5 X=================================================================== XRCS file: /CVSREPO/fbsd/src/share/man/man5/rc.conf.5,v Xretrieving revision 1.84 Xdiff -u -u -r1.84 rc.conf.5 X--- share/man/man5/rc.conf.5 2000/10/28 13:35:30 1.84 X+++ share/man/man5/rc.conf.5 2001/01/15 19:08:44 X@@ -1302,6 +1302,18 @@ X then run the X .Xr cron 8 X daemon at system boot time. X+.It Ar cron_program X+(str) path to X+.Xr cron 8 X+(default X+.Pa cron ) . X+.It Ar cron_flags X+(str) if X+.Ar cron_enable X+is set to X+.Ar YES , X+these are the flags to pass to X+.Xr cron 8 . X .It Ar lpd_program X (str) path to X .Xr lpd 8 END-of-cronvars.diff exit virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message