On Thu, 12 May 2011 15:28:54 +0200 Michal Hlavinka wrote:
1) does systemd support alternative to "service sthd
configtest" or
other special actions?
No.
2) does systemd have support for conditions in service files? It
seem
it's not supported right now. Is there any plan for this?
Can you give an example of what kind of conditions you have in mind?
3) in which cases I should ommit [Install] section in service file?
You need an [Install] section if you want "systemctl {enable,disable}
foo.service" to work.
4) Is there any difference between
a) A.service: After=B.service
and
b) B.service: Before=A.service
or both a) and b) are required?
One of them is enough, the other is redundant.
We have service A and service B. Service B requires service A, but
it
can require service A from different host (depends on configuration).
So we've added After=A in service B and also Before=B in service A,
but it did not help. Expected result was B is started and if A is
configured to start too, it should be started before B. Actual result
is that B is started before A if both of them should start (when
using systemctl start B.service A.service).
I answered this in the bug you reported:
https://bugzilla.redhat.com/show_bug.cgi?id=704214
5) in old initscripts, there was /etc/init.d/halt with section for
ups
shutdown. With that script gone, was that functionality ported to
systemd somehow?
For a program to be run very late just before shutdown you can put it
in /lib/systemd/system-shutdown.
Or you can have a service wanted by final.target and run after
shutdown.target (see halt-local.service for an example of this).
Michal