All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomas Frydrych <tf+lists.yocto@r-finger.com>
To: poky@yoctoproject.org
Subject: Re: Running script after installation (postinst)
Date: Tue, 12 Jun 2012 15:49:17 +0100	[thread overview]
Message-ID: <4FD756ED.8020308@r-finger.com> (raw)
In-Reply-To: <4FD753B2.9060705@yahoo.fr>

Hi,

On 12/06/12 15:35, Patrick wrote:
> In one of our recipes we need to execute a small script after the
> installation of the package. Following yocto dev manual point 4.3.6 we
> have added a pkg_postinst function.
> 
> This doesn’t work properly as the script is executed at first start-up
> and not after installation. Below are an example of this recipe.
> 
> Do you have any idea why this script is started as first boot time and
> not after installation ?

It will be run both times (often postinst scripts have to be run on the
actual HW). You can chose when your code takes effect by testing the $D
variable; when it is set, your script is being run during the rootfs
creation, when it is unset, it is being run on the first boot. There are
many examples of this in the Yocto recipes.

Your particular script will not work as is at rootfs time, since it is
trying to modify '/etc', which at that point is the host /etc directory.

Tomas


      parent reply	other threads:[~2012-06-12 14:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 14:35 Running script after installation (postinst) Patrick
2012-06-12 14:47 ` Richard Purdie
2012-06-13  7:18   ` Patrick
2012-06-13  8:08     ` Richard Purdie
     [not found]       ` <4FD8A5F5.4080001@yahoo.fr>
2012-06-13 15:22         ` Patrick
2012-06-14 13:30           ` Patrick
2012-06-14 14:24             ` Patrick
2012-06-14 14:40             ` Richard Purdie
2012-06-12 14:49 ` Tomas Frydrych [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD756ED.8020308@r-finger.com \
    --to=tf+lists.yocto@r-finger.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.