Le jeudi 23 juin 2011 à 19:21 +0200, Christian Boltz a écrit :
Hello,
on Mittwoch, 22. Juni 2011, Frederic Crozat wrote:
Here is a new version of the proposal, based on our feedback : ... %service_add_enabled() if [ "$1" -eq 1 ] ; then # Initial installation /bin/systemctl enable %{1}.service >/dev/null 2>&1 || : fi ... usage :
%post %service_add demo.service
This looks buggy ;-)
Your macros all contain %{1}.service - therefore calling them with *.service as parameter will double it.
The question is what is better: a) remove the .service when calling the macro (that saves packagers some keystrokes) b) remove the .service in the macros (that makes them more flexible - IIRC systemd also supports things like *.socket etc.)
You know systemd much better than I do, therefore I'll let the decision up to you.
Well, it depends if we want to also use those macros for handle sysvinit
initscripts.
I guess this will be discussed on systemd-devel.
I'll post the proposal today.
Thanks again everybody for your comments.
--
Frederic Crozat