On Wednesday 24 August 2011 17:25:40 Marius Tolzmann wrote: > On 24.08.2011 16:01, Lennart Poettering wrote: > > On Tue, 02.08.11 17:06, Marius Tolzmann ([email protected]) wrote: > >> > >> is there a way to execute a program and take its exit status to > >> evaluate the condition? like ConditionExec or whatever. > >> > >> is this already possible without getting a "failed" service? > > > > Hmm, so I think we should make sure that systemd unit files don't become > > a programming language. i.e. there needs to be a limit on what we want > > to allow to be expressed in unit files. I am tempted to say that checks > > like this are probably beyond that limit, and fall into the domain where > > shell scripts should be used. I.e. write a tiny shell script that is > > executed in ExecStartPre invokes your tool, checks the return code and > > then fails if needed. > > Hi... thanks for the reply.. > > i really don't want to implement complex checks within unit files.. but > currently systemd lacks a clean possibility to implement complex checks > outside of unit files. >
snip... Why not have the complex logic run before the system reboots and chaneg the systemd dependancies? For example in our application a TV card is optional. We could check at run time during boot, but it seemed cleaner to us to change the dependancies. Barry _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
