[yocto] FW: stupid question about post-installation scripts

Paul Eggleton paul.eggleton at linux.intel.com
Mon Nov 25 09:06:51 PST 2013


On Monday 25 November 2013 17:01:10 Paul Eggleton wrote:
> On Monday 25 November 2013 15:21:41 Rifenbark, Scott M wrote:
> > >From: Robert P. J. Day [mailto:rpjday at crashcourse.ca]
> > >Sent: Sunday, November 24, 2013 2:37 AM
> > >To: Rifenbark, Scott M
> > >Subject: stupid question about post-installation scripts
> > >
> > >  when one defines pkg_postinst scripts, are those scripts invoked at
> > >
> > >*both* root filesystem creation time and first boot time? so that one
> > >needs
> > >to manually check the value of ${D} to decide whether to run them, say,
> > >at
> > >first boot time?
> 
> Not both - it's either-or; i.e. it will be run at rootfs creation time and
> if it fails then, it will be run on first boot. Yes you can use the value
> of $D (note: *not* ${D}!) to find out where the script is being called
> from, if necessary.

PS, if you really do want to force the script to be postponed until first boot, 
you *must* make the postinst script fail if $D has a value - if you just let 
it pass the system will assume it doesn't need to be called again on first 
boot.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list