Le vendredi 14 février 2014 à 11:36 +0100, Johannes Meixner a écrit :
Hello,
On Feb 13 12:51 Frederic Crozat wrote (excerpt):
Le jeudi 13 février 2014 à 11:43 +0100, Johannes Meixner a écrit :
How exactly should the RPM spec file scriptles be in package foobar version 1 versus foobar version 2 when foobar version 1 provides foo.service and bar.service but foobar version 2 still provides only foo.service but does no longer provide bar.service?
This is not handled by the macros (and AFAIK, it wasn't the case with the initscripts macros either). You'll have to write this manually using RPM triggers, to properly stop the services and disable them.
Is there a recommended and prehaps already somewhere documented way how one should do that?
<snip>
Is my reasoning correct or should I easily just simply run ------------------------------------------------------------------------ systemctl stop bar.service systemctl disable bar.service ------------------------------------------------------------------------ in an unconditioned way?
Just use:
systemctl --quiet stop bar.service || :
systemctl --quiet disable bar.service || :
This way, it won't break your RPM scripts and will be much simpler to
handle.
--
Frederic Crozat