Your message dated Mon, 20 Oct 2008 17:05:38 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#413529: p-c should use a better cron-script for mobile 
computers
has caused the Debian Bug report #413529,
regarding p-c should use a better cron-script for mobile computers
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
413529: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413529
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: popularity-contest
Version: 1.33
Severity: wishlist

Hello Maintainer,

I run several Laptops and other Mobil-Computers with popularity-
contest but unfortunatly the scripts are never executed.

What I have currently done is a script which is called all 15
minutes and check whether it has (in the last 7 days) send a
pop-con submission and if not, it create and send it.

It would be nice, if you can cleanly implement it specialy for
Mobile-Computers.  I think, debconf can be used to (de)activate
the script in /etc/cron.weekly/popularity-contest and use instead
a /etc/cron.d/popularity-contest job.

E.g.:
----[ '/etc/cron.d/popularity-contest' ]-------------------------------
*/15 * * * * /etc/cron.weekly/popularity-contest foo
-----------------------------------------------------------------------

and

----[ '/etc/cron.weekly/popularity-contest' ]--------------------------
#!/bin/sh

# don't run if this package is removed but not purged
if [ ! -f /usr/sbin/popularity-contest ]; then
        exit 0
fi

unset MAILFROM
unset MAILTO
unset MY_HOSTID
unset PARTICIPATE

# get configuration information
. /usr/share/popularity-contest/default.conf
. /etc/popularity-contest.conf

# Check, whether we run mobile and if called from cron.d
if [ "${MOBILE}" = "true" ] && [ -z "$1" ] ; then exit 0 ; fi

# Check, whether the delay between two calls is greater then
# 7 days (604800 seconds)
if [ "${MOBILE}" = "true" ] ; then
  OLDTIME=$(cat /var/lib/popularity-contest/lastrun 2>/dev/null)
  NEWTIME=$(date +%s)
  DIFTIME=$((NEWTIME-OLDTIME))
  if [ ${DIFTIME} -lt 604800 ] ; then exit 0 ; fi
  echo "${NEWTIME}" >/var/lib/popularity-contest/lastrun
fi

<snip>
-----------------------------------------------------------------------

and for the to "debconf" added VALUE ${MOBILE}

----[ '/etc/popularity-contest.conf' ]---------------------------------
MY_HOSTID="7a500ea53cd746e7b10608044eb387a2"
PARTICIPATE="yes"

MAILTO="[EMAIL PROTECTED], [EMAIL PROTECTED]"
MAILFROM="[EMAIL PROTECTED]"

MOBILE="true"
-----------------------------------------------------------------------

which mean, the pop-con script will only run, if

1)  the value of MOBILE is "false" and $1 is empty (which is the case
    if it run from /etc/cron.weekly/popularity-contest

2)  if calue of MOBILE is true and $1 is anything but not empty (which
    is the case if run from '/etc/cron.d/popularity-contest')

Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant



-- System Information
Debian Release: testing/unstable
Kernel Version: Linux samba3.private 2.4.27-2-386 #1 Wed Nov 30 21:38:51 JST 
2005 i686 GNU/Linux


Versions of the packages popularity-contest depends on:
ii  debconf        1.5.3          Debian configuration management system
ii  dpkg           1.13.21        package maintenance system for Debian
debconf Version: 1.5.3 (Provides virtual package debconf-2.0)
ii  debconf        1.5.3          Debian configuration management system
        ^^^ (Provides virtual package debconf-2.0)
dpkg-awk        Not installed or no info



-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Re: Michelle Konzack 2007-03-13 <[EMAIL PROTECTED]>
> > Why not simply install anacron which is part of the laptop task 
> > and is mentionned in the popcon FAQ ?
> 
> I have already tried it but "anacron" mess up some other
> cronjobs which MUST be executed to a specified time or not.
> 
> It is only for p-c where it is needed, since my Laptop is at
> least 16 hours per day switched on, but only online if I go
> to the Internet Cafe or to customes where I have Internet.

Hi,

please consider using submission via email. This way, submissions will
be queued until networking is available. For the other part, anacron
is the right thing to use, if your other cronjobs need a particular
date to run, don't put them in cron.daily.

Christoph
-- 
[EMAIL PROTECTED] | http://www.df7cb.de/

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to