On Thu, Oct 10, 2013 at 4:31 AM, Paul Eggleton <
paul.eggle...@linux.intel.com> wrote:

> That's really the recommended way to do it. If the software being
> configured
> supports it, another way is to set it up to read all configuration files
> from a
> directory and then you can simply install a new file into that directory
> from
> the other recipe (e.g. Apache is usually configured to read all
> configuration
> files in /etc/httpd/conf.d or similar).
>

Yes, I would have liked to solve the problem that way, but unfortunately
the software doesn't support it, and we don't want to make changes
currently. :)

I'm having a lot of trouble getting pkg_postinst() to work.  From what I've
read, it should happen during rootfs generation, but I'm not see the file
in the rootfs.

I found an example in the xfce4-session_4.10.0.bb recipe.  It looks like
/etc/hosts is installed by netbase, so this is very similar to what my
recipe is doing.
# protect from frightening message that xfce might not work correctly
pkg_postinst_${PN} () {
    echo 127.0.0.1    ${MACHINE} >> /etc/hosts
}

I've tried this in my recipe, and the file that I expect to be present in
the rootfs is not there...not sure what I'm doing wrong.
pkg_postinst_${PN} () {
    echo test >> /etc/inittest2
}

Also, the documentation states that this mechanism can be used to do things
on first boot.  Do I need to add code to make sure that this doesn't happen
on first boot?

Thanks!

Seth
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to