[yocto] Problems with postinstall

Neuer User auslands-kv at gmx.de
Fri Jun 6 04:08:37 PDT 2014


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?

Thanks a lot

Michael




More information about the yocto mailing list