Vincent Untz wrote:
Hey,
Le mercredi 15 juin 2011, à 18:57 +0200, Frederic Crozat a écrit :
However, I'm not sure we should directly add those direct call to systemctl in %post but instead, use some macros, similar to the one we have for sysvinit and / or update those macros to be systemd compliant : %stop_on_removal / %insserv_force_if_yast / %{fillup_only} / % restart_on_update / etc..
+1 for macros. I don't think it's worth trying to update the macros; adding new ones should work well enough -- especially as there's a new file to package anyway, so people will notice there's something to do.
systemd unit files are usually named the same as the init scripts though. So adding some code that transparently handles both the init script and systemd files should be no problem. Note that there already %service_add, %service_del_preun and %service_del_postun. So you can use those instead of %fillup_and_insserv&co to make the .spec file look more modern :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org