Package: util-vserver
Version: 0.30.214-3
Severity: serious
File: /var/lib/dpkg/info/util-vserver.postinst

The postinst script unconditionally removes /etc/vserver{,s}.conf on
every configuration.  Since the configuration is apparently preserved
by sourcing the files and creating a symlink in place of their
content, this is okay.  However the package both includes and removes
the conffile vservers.conf which is not allowed.

It's is also not okay if VSERVERS_ROOT and VSERVER_ROOT aren't the
only things that were ever specified in those files, or if something
else *could* have been (legitimately?) added there.  Preferably the
files aren't removed if anything else is there:

        for f in /etc/vserver.conf /etc/vservers.conf
        do
                if grep -ve '^VSERVERS_ROOT' -e '^VSERVER_ROOT' "$f" >/dev/null
                then
                        echo "$0: warning: not removing obsolete "$f"
                else
                        echo "$0: removing obsolete conffile: "$f"
                        rm -fv -- "$f"
                fi >&2
        done

The same problem with these removals:

|# Remove old startup scripts
|rm -f /etc/init.d/vservers-legacy
|rm -f /etc/init.d/vservers-default
|rm -f /etc/init.d/vprocunhide
|rm -f /etc/default/util-vservere
[...]
|rm -f /etc/init.d/rebootmgr

The situation is marginally different since these files aren't
included in the current package version.  These should be removed iff:

 1. A version check with dpkg --compare-versions is true; and
 2. the file exists; and
 3. its md5sum matches the value stored in the dpkg status database
    for the most-recently installed copy of the file; and
 4. echo "$0: removing obsolete conffile: $f" >&2

Otherwise, (assuming they're really obsolete), if (1) and (2) is true,
the file should be renamed eg. to $f.dpkg-old and a message should be
printed: echo "$0: renaming modified, obsolete conffile: $f" >&2

Since this is the postinst script, dpkg rollbacks don't need to be (or
can't be) supported in those removals.  However I wonder whether these
manipulations shouldn't instead be performed in the preinst.

There's another problem too: removal of the symlinks isn't preserved:
run.rev vdirbase



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

Reply via email to