Package: chrony
Version: 1.21z-4
Severity: serious
Justification: 6.2
Tags: patch

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:

[EMAIL PROTECTED]:~$ sudo dpkg --configure --pending
Setting up chrony (1.21z-4) ...
mv: cannot stat `/etc/chrony/chrony.keys.1.21-2': No such file or directory
dpkg: error processing chrony (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 chrony


I suggest something like:

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


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: sparc (sparc64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-sparc64
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)

Versions of packages chrony depends on:
ii  libc6                        2.3.6.ds1-6 GNU C Library: Shared libraries
ii  libncurses5                  5.5-4       Shared libraries for terminal hand
ii  libreadline5                 5.1-9       GNU readline and history libraries
ii  ucf                          2.0015      Update Configuration File: preserv

chrony recommends no packages.

-- no debconf information


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

Reply via email to