[yocto] Problems with postinstall
Søren Holm
sgh at sgh.dk
Fri Jun 6 00:11:54 PDT 2014
Hi
postinstall is afaik run during installation. And that could very well be on
the actual target. So ${S} etc. are not available. The step is just for steps
that *need* to run on the actual target utilizing the files that where install
in do_install.
Fredag den 6. juni 2014 08:16:39 skrev Neuer User:
> 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.
>
> Am 05.06.2014 12:44, schrieb Neuer User:
> > Hi
> >
> > I am desperately trying to get some postinstall scripts working. They
> > should replace some defualt files with custom files I have. They are all
> > in one package. The package looks like this:
> >
> > do_install() {
> >
> > install -d ${D}${sbindir}
> > install -m 0700 ${S}/sbin/* ${D}${sbindir}
> >
> > install -d ${D}${bindir}
> > install -m 0755 ${S}/bin/LEDstatus ${D}${bindir}
> >
> > install -d ${D}/etc/udev/rules.d
> > install -m 0644 ${S}/udev/* ${D}/etc/udev/rules.d/
> >
> > install -d ${D}/etc/ssh
> > install -m 0600 ${S}/ssh/ssh_* ${D}/etc/ssh/
> > install -m 0644 ${S}/ssh/authorized_keys ${D}/etc/ssh/
> >
> > install -d ${D}/etc/gnupg
> > install -m 0600 ${S}/gnupg/trustedkeys.gpg ${D}/etc/gnupg/
> >
> > }
> >
> > # 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
> > }
> >
> > RDEPENDS_${PN} += "ntpdate udev ssh sudo"
> >
> > FILES_${PN} += "/*"
> >
> >
> > I even tried changing the ownership of the files, but that did not
> > change aything.
> >
> > Am I doing this completely wrong?
> >
> > Thanks for any hints
> >
> > Michael
--
Søren Holm
More information about the yocto
mailing list