On Thu, Oct 10, 2013 at 9:40 AM, Burton, Ross <ross.bur...@intel.com> wrote:

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

Ok, I changed to as follows:
pkg_postinst_${PN} () {
    echo "testtest" >> ${D}/etc/inittest
}

After that I do a find and the file is only populated in the recipe's image
directory, not the rootfs.

$ find . -iname inittest
./tmp/work/armv5te-dbl-linux-gnueabi/widget/1.0-r0/image/etc/inittest

Thanks!

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

Reply via email to