[Pkg-sysvinit-devel] Bug#183460: Updating symlinks based on new package defaults.

Petter Reinholdtsen pere at hungry.com
Sun Feb 21 07:45:00 UTC 2010


[Kurt Roeckx]
> Because we don't have a way to properly update the symlinks, we
> have either one of 2 situations:
> - The maintainer just removes all the symlinks (remove -f) in
>   the maintainer scripts and then adds the new ones.  This
>   potationaly removes configuration done by the user.

With the current update-rc.d interface, this is the only way to fix
the situation, with the negative consequences it has.  The update-rc.d
interface have to be changed to get any other options.

Some work to extend the update-rc.d interface was started, but never
completed.  There is currently no other portable option when changing
runlevel settings that work for both sysv-rc and file-rc than to
remove and reinsert the init.d script settings.

I know some added code in the postinst to handle sysv-rc and file-rc
differently.  For example hal have code like this:

    # Remove old stop symlinks on upgrades
    if dpkg --compare-versions "$2" lt-nl "0.5.11-6"; then
      rm -f /etc/rc[06].d/K??hal
    fi

This only work with sysv-rc, and users using file-rc will be left with
the stop settings for runlevels 0 and 6.  I do not recommend this
method.  I recommend using the update-rc.d interface instead, and
accept that user configuration might be lost, until the update-rc.d
interface is extended for both sysv-rc and file-rc (or one of them is
dropped and the other is extended. :).

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list