Hi David, On Thu, Sep 06, 2012 at 10:01:01AM -0700, David Wolfskill wrote: > I was poking around to see if I could find a reasonable way to set the > UNAME_r environment variable for an instance of cron(8) running in a > jail (so that cron-initiated tasks could automagically inherit the > value, without requiring that every crontab instance within the > jail specify it), and I started to think about ways to coerce the > cron_program variable from /etc/defaults/rc.conf: > > d134(8.3-S)[2] grep cron defaults/rc.conf > cron_enable="YES" # Run the periodic job daemon. > cron_program="/usr/sbin/cron" # Which cron executable to run (if enabled). > cron_dst="YES" # Handle DST transitions intelligently (YES/NO) > cron_flags="" # Which options to pass to the cron daemon. > entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron. > d134(8.3-S)[3] > > to set the environment variable. > > But inspection of rc.d/cron shows: > > d134(8.3-S)[6] grep cron_program rc.d/cron ; echo $? > 1
Can you please try the attached patch? Glen
Index: etc/rc.d/cron
===================================================================
--- etc/rc.d/cron (revision 240152)
+++ etc/rc.d/cron (working copy)
@@ -12,10 +12,11 @@
name="cron"
rcvar="cron_enable"
-command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
load_rc_config $name
+command=${cron_program:-/usr/sbin/${name}}
+
if checkyesno cron_dst
then
cron_flags="$cron_flags -s"
pgphseSIobIki.pgp
Description: PGP signature
