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

Re: Freeze exception: tumgreyspf 1.35-5 (bugfix: #590492)



Adam D. Barratt wrote:
> On Fri, 2010-08-27 at 16:14 +0800, Thomas Goirand wrote:
>> Adam D. Barratt wrote:
>>> On Thu, 2010-08-26 at 13:55 +0800, Thomas Goirand wrote:
>>> + echo "Warning: tumgreyspf.postinst had found an old /etc/cron.d/tumgreyspf,"
>>> + echo "and will be deleting it as this version of the package doesn't use the"
>>> + echo "old python script, but a new sh script in /etc/cron.daily/tumgreyspf."
>>>
>>> Might I suggest something more along the lines of
> [...]
>>> You should probably also only remove the old file if it's the version
>>> which was shipped by the package.
>> I've used the above suggested wording.
> 
> You're still unconditionally removing /etc/cron.d/tumgreyspf without
> checking whether the user has modified it, however.
> 
> When was the switch from cron.d to cron.daily made?  That wasn't clear
> from the changelog.
> 
> Regards,
> 
> Adam

Hi Adam,

I rewrote a replacement maintenance scrip in version 1.35-3, which is
more than a year ago. I did that, because upstream's python script is
totally broken, and my shell script runs pretty fast enough. I didn't
delete the old cron job though.

What I want to fix here, is to remove the file in /etc/cron.d/tumgreyspf
that is in all Lenny installation of the package.

Now, if I was to calculate the md5sum of the /etc/cron.d/tumgreyspf and
remove it if it matches, would that do? Something like this:

if [ -f /etc/cron.d/tumgreyspf ] ; then
	MYMD5=`md5sum /etc/cron.d/tumgreyspf | cut -d" " -f1`
	if [ "${MYMD5}" = "24ea9c78656d84da9d734407d8fcd82b" ] ; then
		echo "Old file detected: deleting..."
		rm /etc/cron.d/tumgreyspf
	fi
fi

Of course, "24ea9c78656d84da9d734407d8fcd82b" is the md5sum of the file
that is currently in Lenny (and I believe, in all previous versions of
the package, as I don't remember changing it prior to a release in Debian).

If you think the above is what should be done, I can prepare a new
Debian release 1.35-7 for Squeeze. Please let me know.

Thomas


Reply to: