[OE-core] [PATCH] systemd.bbclass: restart service in postinst, not start

Koen Kooi koen at dominion.thruhere.net
Wed Apr 10 05:46:37 UTC 2013


Op 9 apr. 2013, om 17:48 heeft Ross Burton <ross.burton at intel.com> het volgende geschreven:

> When upgrading packages it's possible that the service is already running
> because opkg doesn't actually execute the prerm hooks on upgrades, which is
> where the service should be stopped.
> 
> Handle this case by restarting in postinst instead of starting.  If the service
> isn't already running then this doesn't make a difference, but if it is running
> then the service will be restarted.

In the specific case of upgrades you'll need to add a

	systemctl --system daemon-reload

to catch changed unit files as well.

regards,

Koen



More information about the Openembedded-core mailing list