[OE-core] sysvinit upgrade woes

Paul Eggleton paul.eggleton at linux.intel.com
Thu Apr 16 17:56:31 UTC 2015


Hi Bryan,

On Thursday 16 April 2015 13:53:14 Bryan Evenson wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces at lists.openembedded.org
> > [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
> > Of Bryan Evenson
> > Sent: Tuesday, April 14, 2015 11:26 AM
> > To: openembedded-core at lists.openembedded.org
> > Subject: [OE-core] sysvinit upgrade woes
> > 
> > I am using opkg for package management and sysvinit for init.  I am
> > testing a large jump on an upgrade and I have been having a few issues. 
> > One issue I have traced to sysvinit's upgrade, but I'm unsure how to
> > remedy the solution.
> > 
> > At some point during the upgrade process, opkg records what the new
> > version is of all the packages getting installed.  However, when I upgrade
> > sysvinit causes sysvinit to restart before opkg has recorded which
> > packages
> > were just installed.  So opkg thinks that it didn't upgrade anything even
> > though all packages were upgraded.  I verified that if I call "opkg
> > upgrade" for all packages that require upgrade except for sysvinit that
> > opkg correctly records which packages were upgraded.  However, the end
> > user doesn't have that kind of control, so upgrading in this manner is
> > not an option.
> > 
> > Has anyone else seen a similar issue?  Any ideas on how to hold off
> > sysvinit from restarting until after opkg has finished recording its
> > information?
>
> I've found the problem but don't yet have a good solution.  At the end of
> the sysvinit-inittab pkg_postinst script is the line:
> 
> 	kill -HUP 1
> 
> This kills init before opkg has finished doing its job.  On my system, I've
> added a .bbappend with a pk_postinst script as follows for items that
> require a reboot after installation:
> 
>     touch /var/run/reboot-required
>     echo "${PN}" >>/var/run/reboot-required.pkgs
> 
> After my system performs firmware upgrade, it checks if
> /var/run/reboot-required exists and then reboots the system.  So on my
> system, I changed the pkg_postinst script for sysvinit-inittab to replace
> the "kill -HUP 1" with the reboot required notations.
> 
> Is there some suitable solution that would be reasonable to change in the
> sysvinit-inittab recipe that would work for other people?

SIGHUP is supposed to make sysvinit re-read inittab, not kill it. Can you tell 
what is actually happening?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list