On Fri, Jun 6, 2014 at 1:08 PM, Neuer User <auslands...@gmx.de> wrote:

> Am 06.06.2014 12:54, schrieb Paul Barker:
> > I usually leave things more than a day before sending a ping email,
> > people can be busy but usually you'll get replies within a couple of
> > days on this list.
> >
>
> Sorry, I guess these 18h were driving me crazy as I don't understand why
> it is not working. I actually thought, it had already been working
> earlier...
>
> >>>
> >>> # Overwrite some configuration data with specific files
> >>> pkg_postinst_${PN} () {
> >>>     install -o root -g root -m 0600 ${S}/ssh/sshd_config ${D}/etc/ssh/
> >>>     install -m 0755 ${S}/etc/rc.local ${D}/etc/
> >>>     install -m 0644 ${S}/etc/watchdog.conf ${D}/etc/
> >>>     install -m 0400 ${S}/etc/shadow ${D}/etc/
> >>>     install -m 0440 ${S}/etc/sudoers ${D}/etc/
> >>>     install -d ${D}/etc/default
> >>>     install -o root -g root -m 0644 ${S}/etc/default-ntpdate
> >>> ${D}/etc/default/ntpdate
> >>> }
> >>>
> >
> > The postinst is executed by the package manager when the package is
> > installed. If that installation takes place during do_rootfs, ${D}
> > will refer to the rootfs directory for the image being built and ${S}
> > will probably refer to something else to do with the image recipe but
> > I'm not entirely sure on the details. If the installation takes place
> > on the device, or the postinst is delayed until the first boot, ${D}
> > and ${S} will not be set.
> >
> > Hope this helps,
> >
>
> So, I guess there are now two possibilities:
> a.) The postinstall is not done at all.
> b.) The postinstall is done, but before the other packages are
> installed, which overwrite the files again. Is this possible? If yes,
> howto specify that this postinstall should really be done last of all?
>
>
I'm not sure if this helps, but you can specify rootfs-post-process
commands in your image recipe:

setup_my_image() {
    # do stuff
}

ROOTFS_POSTPROCESS_COMMAND += 'setup_my_image ;'

This will run after the rootfs is created from the package installations

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

Reply via email to