rc.d/cron appears to ignore rcvar "cron_program" -- intentional?

David Wolfskill david at catwhisker.org
Fri Sep 7 01:17:37 UTC 2012


On Thu, Sep 06, 2012 at 06:11:17PM -0700, Doug Barton wrote:
> ...
> Ah, I thought it was an /etc/crontab type of situation.

:-}  I rather like /etc/crontab.  But this is for (quasi-)random
developers -- and some of their build tools are sensitive to the output
of "uname -r".

> So it sounds like what you were already thinking of doing was writing a
> little script that exports that envar and then execs /usr/sbin/cron.
> That should do it for you. Then you just change cron_program to point to
> your script in /etc/rc.con[.local]. Sorry if I'm being painfully
> obvious, just want to make sure we close the loop.

I was thinkinig of doing something like that, yes -- so as a reality
check, I hacked /etc/rc.d/cron to export UNAME_r before issuing
run_rc_command; that was not effective.  So I've started looking at the
code in src/usr.sbin/cron to see if it may be clearing the environment.

At which point, this is rather far off-topic for -rc@, so it probably
ought not be discussed further here.

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20120907/c623a5b4/attachment.pgp


More information about the freebsd-rc mailing list