[poky] Postinstall script problem
matti kaasinen
matti.kaasinen at gmail.com
Mon Aug 31 23:40:55 PDT 2015
I'm using Poky fido branch.
Thanks,
Matti
2015-08-31 16:31 GMT+03:00 matti kaasinen <matti.kaasinen at gmail.com>:
> Hi!
>
> How is pkg_postinstall_${PN} supposed to work, when package is coming from
> imgage? My experience is that it is not executed at all.
>
> In classical openembedded it was run for the first time when image
> started. Is this changed in Poky/yocto based operation?
>
> However, if I install same package using opkg, everything works fine. What
> I try to do is appending a line to /etc/inittab. I also tried to do it
> during image creation (to ${STAGING_DIR_HOST}${sysconfdir}/inittab), but
> results are the same - only the file created by systemv-inittab gets
> created with nothing extra.
>
> I guess this is a pretty common problem, so that there could be some neat
> solution for this. Is anyone familiar with this issue?
>
> My postinst script is as follows (really working with opkg)
> pkg_postinst_${PN} () {
> #!/bin/sh -e
>
> if [ "x$D" = "x" ]; then
> # run this on the target
> echo '########################################'
> echo '## Installing starter for daemontools ##'
> echo '########################################'
>
> if [ -z "$(grep -e svscanboot ${sysconfdir}/inittab)" ] ; then
> echo "SV:12345:respawn:${bindir}/svscanboot" >>
> ${sysconfdir}/inittab
> fi
> fi
> }
>
> Thanks,
> Matti
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20150901/b84339c8/attachment.html>
More information about the poky
mailing list