[yocto] Problems with postinstall

Paul Barker paul at paulbarker.me.uk
Fri Jun 6 03:54:49 PDT 2014


On 6 June 2014 07:16, Neuer User <auslands-kv at gmx.de> wrote:
> Nobody using any postinstalls?
>
> I am still wondering why the postinstall does not work. I don't get any
> error messages. The files are just not installed.
>

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.

>>
>> # 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,

-- 
Paul Barker

Email: paul at paulbarker.me.uk
http://www.paulbarker.me.uk



More information about the yocto mailing list