[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron has gone to UTC time?



> to your cron file that does 'date' and 'date -u'? Set it to run more

I haven't seen the problem yet myself, but throw in an "env"
too... I've noted (in a bug report in regard to inetd) that doing
"apt-get upgrade" with sudo or su with a full *user* environment often
means that you end up with an incorrect environment for daemons that
get upgraded -- cron is vulnerable to the same bug, and probably
amenable to a similar fix: use 
	env - TZ=$(cat /etc/timezone) PATH=/sbin start-stop-daemon ... cron

instead of just using start-stop-daemon...  One could argue that the
sysadmin should know better; however, it's a mistake that people have
been making since the 4.2BSD days (I've seen this with sendmail and
$USER on charon.mit.edu when it was a VAX 11/750, and more recently on
an otherwise well-managed Solaris box) that I think we should really
(1) prevent the problem in the postinst scripts (2) document such...

I'll also note that there's perhaps value to getting start-stop-daemon
to do the work (with a --base-environment option?) just for
consistency, but it *still* means modifying all the postinst scripts,
so why wait...


Reply to: