Hi Lionel,

On Thu, Nov 09, 2006 at 10:49:53AM +0100, Lionel Elie Mamane wrote:
> This code:

>     if dpkg --compare-versions "$2" lt-nl 1.21-3 ; then
>             mv /etc/chrony/chrony.keys."$2" /etc/chrony/chrony.keys
>             mv /etc/chrony/chrony.conf."$2" /etc/chrony/chrony.conf
>         fi

> in the postinst makes the postinst not idempotent, and makes my chrony
> fail to configure:

Idempotency is not a release-critical requirement per se.  Can you comment
on why this code failed for you at all?  Did the postinst script in fact run
twice, and fail with a *different* problem the first time through?  Or did
it fail because these files are missing from your system for some other
reason?

The only lines after this in the postinst are:

ucf --sum-file /usr/share/chrony/chrony.conf.md5sum /etc/chrony/chrony.conf.new 
/etc/chrony/chrony.conf
rm /etc/chrony/chrony.conf.new

invoke-rc.d chrony start

Idempotency is only an issue if one of these lines fails, since otherwise
the postinst will complete successfully the first time and never again be
called with the same arguments.  Thus I think identifying the underlying
failure on your system is at least as important as making the mv commands
more robust.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
[EMAIL PROTECTED]                                   http://www.debian.org/


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

Reply via email to