Package: apticron
Version: 1.1.42
Severity: normal

Hi,
I have two messages from apticron per day. The timestamp logic is broken
somewhat. I noticed, that /etc/cron.daily/apticron executes apticron
without option --cron (that was there in Lenny package).

-------------------- /etc/cron.d/apticron --------------------
# cron entry for apticron

15 7 * * * root test -x /usr/sbin/apticron && /usr/sbin/apticron --cron
-------------------- /etc/cron.d/apticron --------------------

-------------------- /etc/cron.daily/apticron --------------------
#!/bin/sh

if [ ! -x /usr/sbin/apticron ] ; then
        exit 0
else
        /usr/sbin/apticron
fi
-------------------- /etc/cron.daily/apticron --------------------

The timestamp logic of /usr/sbin/apticron is processed only with
the option --cron.

Maybe a simple testing a date (date +%Y%m%d) written info timestamp file
maybe a bit easier than mtime processing used currently.

today=$(date +%Y%m%d)
read lastrun <$tsfile >/dev/null 2>/dev/null
if test "x$today" = "x$lastrun"
then
    exit 0
else
    echo $today >$tsfile
fi

Best regards
-- 
Zito


-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apticron depends on:
ii  apt                0.8.10.3+squeeze1     Advanced front-end for dpkg
ii  bsd-mailx [mailx]  8.1.2-0.20100314cvs-1 simple mail user agent
ii  cron               3.0pl1-116            process scheduling daemon
ii  debconf [debconf-2 1.5.36.1              Debian configuration management sy
ii  ucf                3.0025+nmu1           Update Configuration File: preserv

Versions of packages apticron recommends:
ii  apt-listchanges          2.85.7+squeeze1 package change history notificatio
ii  iproute                  20100519-3      networking and traffic control too

apticron suggests no packages.

-- debconf information:
  apticron/notification: root



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to