[oe] [PATCH 1/2] classes/update-rc.d.bbclass: move update-rc after postinst

Martin Jansa martin.jansa at gmail.com
Tue Sep 28 16:09:13 UTC 2010


On Wed, Sep 22, 2010 at 3:18 PM, Eric Bénard <eric at eukrea.com> wrote:
> without this, launching a daemon can fail if postinst is supposed, for
> example, to fix permissions of directories used by the daemon.
>
> Signed-off-by: Eric Bénard <eric at eukrea.com>

FYI: this maybe somehow broke syslog-ng postinst:

Configuring syslog-ng.
update-rc.d: /etc/init.d/syslog exists during rc.d purge (continuing)
 Removing any system startup links for syslog ...
update-rc.d: /etc/init.d/syslog-ng exists during rc.d purge (use -f to force)

from syslog-ng package:
OE om-gta02 at shr ~/test $ cat postinst
#!/bin/sh
        update-rc.d -f syslog remove
if test "x$D" != "x"; then
        OPT="-r $D"
else
        OPT="-s"
fi
update-rc.d $OPT syslog-ng remove
OE om-gta02 at shr ~/test $ cat prerm
#!/bin/sh
if test "x$D" = "x"; then
        if test "$1" = "upgrade" -o "$1" = "remove"; then
                /etc/init.d/syslog-ng stop
        fi
fi
OE om-gta02 at shr ~/test $ cat postrm
update-rc.d syslog add 5
if test "x$D" != "x"; then
        OPT="-r $D"
else
        OPT=""
fi
if test "$1" = "remove" -o "$1" = "purge"; then
        if ! test -e "/etc/init.d/syslog-ng"; then
                update-rc.d $OPT syslog-ng remove
        fi
fi




More information about the Openembedded-devel mailing list