<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><p dir="ltr">Thanks. But this requires that service_a should be a dummy service. I want both the services in actual deployment scenario and then fail service_a to simulate real crash. Any way I can do that?</p>
</td></tr></table>            <div id="_origMsg_">
                <div>
                    <br />
                    <div>
                        <div style="font-size:0.9em">
                            <hr size="1">
                            <b>
                                <span style="font-weight:bold">From:</span>
                            </b>
                            Michael Biebl <mbiebl@gmail.com>;                            <br>
                            <b>
                                <span style="font-weight:bold">To:</span>
                            </b>
                            Usman <desert03@yahoo.com>;                                                     <br>
                            <b>
                                <span style="font-weight:bold">Cc:</span>
                            </b>
                            systemd-devel@lists.freedesktop.org <systemd-devel@lists.freedesktop.org>;                                                                             <br>
                            <b>
                                <span style="font-weight:bold">Subject:</span>
                            </b>
                            Re: [systemd-devel] How to manually set service in "failed" state                            <br>
                            <b>
                                <span style="font-weight:bold">Sent:</span>
                            </b>
                            Tue, Mar 18, 2014 10:11:12 PM                            <br>
                        </div>
                            <br>
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tbody>
                                    <tr>
                                        <td valign="top">/etc/systemd/system# cat fail.service<br clear="none">[Unit]<br clear="none">Description=Fail service<br clear="none"><br clear="none">[Service]<br clear="none">ExecStart=/bin/false<br clear="none"><div class="yqt4583081683" id="yqtfd52002"><br clear="none">2014-03-18 22:59 GMT+01:00 Usman <<a shape="rect" ymailto="mailto:desert03@yahoo.com" href="javascript:return">desert03@yahoo.com</a>>:<br clear="none">> Hi Guys,<br clear="none">><br clear="none">> I am trying to test some code with respect to my services setup. I have two<br clear="none">> services, lets say service_a and service_b. In service_a unit file I have<br clear="none">> this:<br clear="none">><br clear="none">> OnFailure=service_b<br clear="none">><br clear="none">> And from the man page for OnFailure unit I get this:<br clear="none">><br clear="none">> A space-separated list of one or more
 units that are activated when this<br clear="none">> unit enters the "failed" state<br clear="none">><br clear="none">> My question is, to test this setup, how can I have service_a in a "failed"<br clear="none">> state? I have tried using kill -9, but that leaves service in "signal" state<br clear="none">> and not "failed" state. How can I manually set a service in "failed" state<br clear="none">> so that service_b gets started for my testing? Any specific signal? Any help<br clear="none">> much appreciated.<br clear="none">><br clear="none">> Thanks.</div><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> systemd-devel mailing list<br clear="none">> <a shape="rect" ymailto="mailto:systemd-devel@lists.freedesktop.org" href="javascript:return">systemd-devel@lists.freedesktop.org</a><br clear="none">> <a
 shape="rect" href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br clear="none">><br clear="none"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Why is it that all of the instruments seeking intelligent life in the<br clear="none">universe are pointed away from Earth?<div class="yqt4583081683" id="yqtfd05229"><br clear="none"></div></td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>