Package: cron
Version: 3.0pl1-124
Severity: wishlist

The TZ variable in /etc/default/cron is ignored by Wheezy. It is a quite handy
feature when need to run cron under different timezone, say, UTC.

It is easy to fix by add 'export TZ' to /etc/init.d/cron. Still, I'd like
suggest to bring it back in the official package. It is useful for those who
need it, and harmless to the rest.



-- Package-specific info:
--- EDITOR:
not set

--- /usr/bin/editor:
/bin/nano

--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 35880 Jul  4 05:41 /usr/bin/crontab

--- /var/spool/cron:
drwxr-xr-x 5 root root 4096 Sep 11 17:04 /var/spool/cron

--- /var/spool/cron/crontabs:
drwx-wx--T 2 root crontab 4096 Sep 16 13:06 /var/spool/cron/crontabs

--- /etc/cron.d:
drwxr-xr-x 2 root root 4096 Aug  8 11:52 /etc/cron.d

--- /etc/cron.daily:
drwxr-xr-x 2 root root 4096 Sep 11 17:05 /etc/cron.daily

--- /etc/cron.hourly:
drwxr-xr-x 2 root root 4096 Aug  8 09:56 /etc/cron.hourly

--- /etc/cron.monthly:
drwxr-xr-x 2 root root 4096 Aug  8 11:52 /etc/cron.monthly

--- /etc/cron.weekly:
drwxr-xr-x 2 root root 4096 Sep  6 17:24 /etc/cron.weekly


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.11 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cron depends on:
ii  adduser         3.113+nmu3
ii  debianutils     4.3.2
ii  dpkg            1.16.8
ii  libc6           2.13-35
ii  libpam-runtime  1.1.3-7.1
ii  libpam0g        1.1.3-7.1
ii  libselinux1     2.1.9-5
ii  lsb-base        4.1+Debian7

Versions of packages cron recommends:
ii  exim4-daemon-light [mail-transport-agent]  4.80-4

Versions of packages cron suggests:
ii  anacron        2.3-19
pn  checksecurity  <none>
ii  logrotate      3.8.1-4

Versions of packages cron is related to:
pn  libnss-ldap   <none>
pn  libnss-ldapd  <none>
pn  libpam-ldap   <none>
pn  libpam-mount  <none>
pn  nis           <none>
pn  nscd          <none>

-- Configuration Files:
/etc/default/cron changed:
READ_ENV="yes"
TZ="UTC"

/etc/init.d/cron changed:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DESC="cron daemon"
NAME=cron
DAEMON=/usr/sbin/cron
PIDFILE=/var/run/crond.pid
SCRIPTNAME=/etc/init.d/"$NAME"
test -f $DAEMON || exit 0
. /lib/lsb/init-functions
[ -r /etc/default/cron ] && . /etc/default/cron
parse_environment () 
{
    for ENV_FILE in /etc/environment /etc/default/locale; do
        [ -r "$ENV_FILE" ] || continue
        [ -s "$ENV_FILE" ] || continue
         for var in LANG LANGUAGE LC_ALL LC_CTYPE; do
             value=`egrep "^${var}=" "$ENV_FILE" | tail -n1 | cut -d= -f2`
             [ -n "$value" ] && eval export $var=$value
             if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
                 log_warning_msg "/etc/environment has been deprecated for 
locale information; use /etc/default/locale for $var=$value instead"
             fi
         done
     done
    if [ -z "$TZ" -a -e /etc/timezone ]; then
        TZ=`cat /etc/timezone` 
    fi
}
if [ "$READ_ENV" = "yes" ] ; then
    export TZ
    parse_environment
fi
case "$1" in
start)  log_daemon_msg "Starting periodic command scheduler" "cron"
        start_daemon -p $PIDFILE $DAEMON $EXTRA_OPTS
        log_end_msg $?
        ;;
stop)   log_daemon_msg "Stopping periodic command scheduler" "cron"
        killproc -p $PIDFILE $DAEMON
        RETVAL=$?
        [ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE
        log_end_msg $RETVAL
        ;;
restart) log_daemon_msg "Restarting periodic command scheduler" "cron" 
        $0 stop
        $0 start
        ;;
reload|force-reload) log_daemon_msg "Reloading configuration files for periodic 
command scheduler" "cron"
        # cron reloads automatically
        log_end_msg 0
        ;;
status)
        status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
        ;;
*)      log_action_msg "Usage: /etc/init.d/cron 
{start|stop|status|restart|reload|force-reload}"
        exit 2
        ;;
esac
exit 0


-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to