[oe] All the syslogs
Martin Jansa
martin.jansa at gmail.com
Fri May 7 11:09:00 UTC 2010
On Fri, May 07, 2010 at 12:59:58PM +0200, Steffen Sledz wrote:
> > OK, than i'll try to create an u-a setting for all the syslogs (btw: we
> > have not three but four different ones, there's sysklogd too).
> >
> > Has anyone combined update-alternatives and update-rc.d for initscripts
> > before? I'm afraid there are some pitfalls in the naming of the initscript
> > itself and the symlinks.
>
> I made some first tests and they confirmed my fears. :(
>
> The recipes look like this:
>
> -------------------->snip<---------------------------
> inherit autotools update-rc.d
>
> do_install_append() {
> ...
> install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
> }
>
> pkg_postinst_${PN} () {
> update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
> }
>
> pkg_prerm_${PN} () {
> update-alternatives --remove syslog-init syslog.${PN}
> }
>
> INITSCRIPT_NAME = "syslog"
> -------------------->snip<---------------------------
>
> When opkg installs the packages it wants to run update-rc.d *before*
> update-alternatives. This results in an "file does not exist" error. :(
>
> Installing rsyslog (5.5.4-r1.0.5) to root...
> Installing busybox-syslog (1.13.2-r24.1.5) to root...
> Configuring rsyslog
> update-rc.d: /etc/init.d/syslog: file does not exist
> update-alternatives: Linking //etc/init.d/syslog to syslog.rsyslog
> Any suggestions?
If there is only one u-a file in recipe you can try
inherit update-alternatives to see if it will generate postinst commands
in right order.
Or in worse case, move update-rc.d logic to your postinst scripts after
setting u-a links.
Regards,
--
uin:136542059 jid:Martin.Jansa at gmail.com
Jansa Martin sip:jamasip at voip.wengo.fr
JaMa
More information about the Openembedded-devel
mailing list