Date: Mon, 15 Jan 2001 19:46:03 +0100 From: Gerhard Sittig <Gerhard.Sittig@gmx.net> To: FreeBSD-gnats-submit@freebsd.org Subject: conf/24358: [PATCH] etc/rc variables for cron(8) Message-ID: <20010115194603.Y253@speedy.gsinet>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010115194603.Y253>