| Submitter | Laurentiu Palcu |
|---|---|
| Date | Jan. 14, 2013, 4:39 p.m. |
| Message ID | <1358181569-30628-1-git-send-email-laurentiu.palcu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/42599/ |
| State | New |
| Headers | show |
Comments
On Mon, Jan 14, 2013 at 06:39:29PM +0200, Laurentiu Palcu wrote: > update-rc.d fails when executing the postinstall on host. That's because > 'syslog' is renamed to 'syslog.busybox' and a 'syslog' link to it is made > instead. However, on host, the link is not valid and update-rc.d will > complain that the file does not exist. On target, this does not happen. > > So, this patch will have update-rc.d create the necessary links to > syslog.busybox instead. Technically, the behavior is unchanged and > syslogd will be started as usual. The only change will be the links in > rcX.d directories: > > Instead of: S20syslog -> ../init.d/syslog > we will have: S20syslog.busybox -> ../init.d/syslog.busybox > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> > --- > meta/recipes-core/busybox/busybox.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc > index 972e7d0..c70ba62 100644 > --- a/meta/recipes-core/busybox/busybox.inc > +++ b/meta/recipes-core/busybox/busybox.inc > @@ -25,7 +25,7 @@ FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" > INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock" > > INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" > -INITSCRIPT_NAME_${PN}-syslog = "syslog" > +INITSCRIPT_NAME_${PN}-syslog = "syslog.${BPN}" What if syslog-ng is installed? won't it run both syslog implementations? > INITSCRIPT_NAME_${PN}-mdev = "mdev" > INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" > INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." > -- > 1.7.9.5 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
On 01/14/2013 06:49 PM, Martin Jansa wrote: > On Mon, Jan 14, 2013 at 06:39:29PM +0200, Laurentiu Palcu wrote: >> update-rc.d fails when executing the postinstall on host. That's because >> 'syslog' is renamed to 'syslog.busybox' and a 'syslog' link to it is made >> instead. However, on host, the link is not valid and update-rc.d will >> complain that the file does not exist. On target, this does not happen. >> >> So, this patch will have update-rc.d create the necessary links to >> syslog.busybox instead. Technically, the behavior is unchanged and >> syslogd will be started as usual. The only change will be the links in >> rcX.d directories: >> >> Instead of: S20syslog -> ../init.d/syslog >> we will have: S20syslog.busybox -> ../init.d/syslog.busybox >> >> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> >> --- >> meta/recipes-core/busybox/busybox.inc | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc >> index 972e7d0..c70ba62 100644 >> --- a/meta/recipes-core/busybox/busybox.inc >> +++ b/meta/recipes-core/busybox/busybox.inc >> @@ -25,7 +25,7 @@ FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" >> INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock" >> >> INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" >> -INITSCRIPT_NAME_${PN}-syslog = "syslog" >> +INITSCRIPT_NAME_${PN}-syslog = "syslog.${BPN}" > > What if syslog-ng is installed? won't it run both syslog implementations? This is a valid concern. It would certainly start them both or, at least, try. But, is it normal for one to have two different syslog implementations installed? Is this a valid use case? Thanks, Laurentiu > >> INITSCRIPT_NAME_${PN}-mdev = "mdev" >> INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" >> INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ." >> -- >> 1.7.9.5 >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >
On 01/15/2013 02:24 PM, Martin Jansa wrote: >> This is a valid concern. It would certainly start them both or, at >> > least, try. But, is it normal for one to have two different syslog >> > implementations installed? Is this a valid use case? > That's why we're using u-a for init script, isn't it? > I guess you're right. I'll have to find another solution. Most likely, change update-rc.d script so that it gets the file the link points to, append the rootfs path to it and then check for the actual file's existence before reporting an error. > Imho the problem is only order of postinst where update-rc.d is executed > before u-a postinst. No, the problem is not on target. The problem is when the postinst is run on host. Basically, update-rc.d will run on a file that points to a path on target: /path/to/target/rootfs/syslog -> /etc/init.d/syslog.busybox On host, this link is invalid and update-rc.d will exit with error. Hence, the postinst will be postponed. Thanks, Laurentiu > > Cheers, >
Patch
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 972e7d0..c70ba62 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -25,7 +25,7 @@ FILES_${PN}-hwclock = "${sysconfdir}/init.d/hwclock.sh" INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd ${PN}-mdev ${PN}-hwclock" INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd" -INITSCRIPT_NAME_${PN}-syslog = "syslog" +INITSCRIPT_NAME_${PN}-syslog = "syslog.${BPN}" INITSCRIPT_NAME_${PN}-mdev = "mdev" INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh" INITSCRIPT_PARAMS_${PN}-mdev = "start 06 S ."
update-rc.d fails when executing the postinstall on host. That's because 'syslog' is renamed to 'syslog.busybox' and a 'syslog' link to it is made instead. However, on host, the link is not valid and update-rc.d will complain that the file does not exist. On target, this does not happen. So, this patch will have update-rc.d create the necessary links to syslog.busybox instead. Technically, the behavior is unchanged and syslogd will be started as usual. The only change will be the links in rcX.d directories: Instead of: S20syslog -> ../init.d/syslog we will have: S20syslog.busybox -> ../init.d/syslog.busybox Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> --- meta/recipes-core/busybox/busybox.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)