Can cf-agent easily know about "systemd" state/target, etc.?
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_41490_103554910.1733409221751
Content-Type: multipart/alternative;
boundary="----=_Part_41491_158270010.1733409221751"
------=_Part_41491_158270010.1733409221751
Content-Type: text/plain; charset="UTF-8"
Context: Linux "systemd" machine; CFE 3.18.
We have an emerging use case to run a specific, minimal (i.e. fast) subset
of our cf-agent policy during machine shutdown/halt. We are considering a
"systemd" service with something like:
ExecStop=cf-agent....
Is there something already in place which can tell us the current state
(target?) of systemd? Perhaps a "var" (e.g. "sys.") in CFE? Or perhaps
something in "/proc" or similar that our policy could peek at?
Failing that, we do could something like:
ExecStop=cf-agent ... -D HALTING
Thanks.
-- David Lee
-- Diamond Light Source
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/help-cfengine/00cbac09-0087-4d2b-8c99-9b3bd656c25dn%40googlegroups.com.
------=_Part_41491_158270010.1733409221751
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div>Context: Linux "systemd" machine; CFE 3.18.<br /></div><div><br /></di=
v><div>We have an emerging use case to run a specific, minimal (i.e. fast) =
subset of our cf-agent policy during machine shutdown/halt.=C2=A0 We are co=
nsidering a "systemd" service with something like:</div><div><br /></div><d=
iv>=C2=A0=C2=A0=C2=A0 ExecStop=3Dcf-agent....<br /></div><div><br /></div><=
div>Is there something already in place which can tell us the current state=
(target?) of systemd?=C2=A0 Perhaps a "var" (e.g. "sys.") in CFE?=C2=A0 Or=
perhaps something in "/proc" or similar that our policy could peek at?</di=
v><div><br /></div><div>Failing that, we do could something like:</div><div=
><br /></div><div>=C2=A0=C2=A0=C2=A0 ExecStop=3Dcf-agent ... -D HALTING</di=
v><div><br /></div><div>Thanks.<br /></div><div><br /></div><div>-- David L=
ee</div><div>-- Diamond Light Source<br /></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;help-cfengine" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">help-=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
help-cfengine/00cbac09-0087-4d2b-8c99-9b3bd656c25dn%40googlegroups.com?utm_=
medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/help-=
cfengine/00cbac09-0087-4d2b-8c99-9b3bd656c25dn%40googlegroups.com</a>.<br /=
>
------=_Part_41491_158270010.1733409221751--
------=_Part_41490_103554910.1733409221751--