[Pkg-utopia-maintainers] Bug#466503: dbus: Fail to remove stop scripts for runlevel 0 and 6 with file-rc and insserv

Petter Reinholdtsen pere at hungry.com
Tue Feb 19 07:03:09 UTC 2008


Package:  dbus
Version:  1.1.4-1
User:     initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-dependency

When upgrading dbus using dependency based boot sequencing, I noticed
this output:

  Fixing up dbus startup script runlevels and priorities...
  insserv: Warning, current stop runlevel(s) of script `dbus' (0 1 6 )
    overwrites defaults (1 ).

Checking the symlinks, the runlevels 0 and 6 were indeed still linked
up, while they were no longer listed in the LSB header.

I then had a look at the postinst script, and found this code:

    echo "Fixing up dbus startup script runlevels and priorities..." >&2
    # update start scripts to use the proper priority
    for l in 2 3 4 5; do
        old=/etc/rc$l.d/S20dbus
        new=/etc/rc$l.d/S12dbus
        if [ -e $old ] && ! [ -e $new ]; then
            mv -vf $old $new >&2
        fi
    done
    # drop stop scripts in runlevels we don't install anymore
    for l in 0 6; do
        if [ -L /etc/rc$l.d/K20dbus ] && \
           [ "../init.d/dbus"  = "$(readlink /etc/rc$l.d/K20dbus)" ]; then
            rm -vf /etc/rc$l.d/K20dbus >&2
        fi
    done
    # update stop script to use the proper priority
    if [ -e /etc/rc1.d/K20dbus ] && ! [ -e /etc/rc1.d/K88dbus ]; then
        mv -vf /etc/rc1.d/K20dbus /etc/rc1.d/K88dbus >&2
    fi

This code seem to assume that plain sysv-rc is used, and will fail
with file-rc as well as dependency based boot sequencing with insserv.
file-rc do not use these symlinks, and insserv will use different
sequence numbers.

In short, this way of updating the boot sequence do not work properly
in Debian.  To get it working with insserv, one would need to not use
hardcoded sequence numbers.  To get it working with file-rc, one would
need to use the features provided by update-rc.d.  As far as I know,
the only working way to update the start and stop sequence in Debian
is to remove them all and insert them again.

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-utopia-maintainers mailing list