On 10 October 2013 15:36, Seth Bollinger <seth.b...@gmail.com> wrote:
> pkg_postinst_${PN} () {
>     echo 127.0.0.1    ${MACHINE} >> /etc/hosts
> }

Yeah, that's broken.

> 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
> }

You need to use $D so that you're not attempting to write to the *host's* /etc:

echo test >> $D/etc/inittest2

In a postinst $D may be set, and if it is then the postinst is being
ran on the host at rootfs time, and points to where the rootfs is
being constructed.

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

Reply via email to