<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10px"><div id="yui_3_16_0_1_1434302687874_34282"><span>Thomasz,</span></div><div id="yui_3_16_0_1_1434302687874_34283"><span><br></span></div><div id="yui_3_16_0_1_1434302687874_34284"><span id="yui_3_16_0_1_1434302687874_34285">Really appreciate your helps. </span>It works perfectly now after taking your instructions.</div><div id="yui_3_16_0_1_1434302687874_34286"><br></div><div id="yui_3_16_0_1_1434302687874_34315">--</div><div id="yui_3_16_0_1_1434302687874_34316">Regards,</div><div id="yui_3_16_0_1_1434302687874_34317">Eric Lu</div><div id="yui_3_16_0_1_1434302687874_34318"><span><br></span></div><div id="yui_3_16_0_1_1434302687874_34319"><span><br></span></div> <br><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 10px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Sunday, June 14, 2015 2:39 AM, Tomasz Torcz <tomek@pipebreaker.pl> wrote:<br> </font> </div> <br><br> <div class="y_msg_container">On Sat, Jun 13, 2015 at 10:39:24PM -0700, Eric Lu wrote:<br clear="none">> Hi,<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> I tested the functionality of system.path in a Fedora 21 workstation. The<br clear="none">> script was executed even though the file specified in PathExists=,<br clear="none">> /var/tmp/tst0, did not exist. Is there something I misunderstand or …:<br clear="none">> <br clear="none"> <br clear="none"> Basically, you have enabled tst.service to be started during boot. So it<br clear="none">is started no matter if file exists or not. You have also enabled tst.path,<br clear="none">so tst.service should be started again when the file appear.<br clear="none"><br clear="none"> You should only enable .path unit. Additionaly, you can guard execution<br clear="none">of .service by ConditionPathExists= (or similar, check man systemd.unit).<br clear="none"> <br clear="none">> <br clear="none">> [<a shape="rect" ymailto="mailto:root@f21" href="mailto:root@f21">root@f21</a> ylu]# systemctl status tst<br clear="none">> <br clear="none">> â tst.service - Tst Controller Service<br clear="none">> Loaded: loaded (/etc/systemd/system/tst.service; enabled)<br clear="none"> ^^^^^^^ it's enabled<br clear="none"> <br clear="none">> Active: inactive (dead) since Sat 2015-06-13 21:08:37 PDT; 1min 18s ago<br clear="none">> Process: 853 ExecStart=/usr/sbin/tst.sh (code=exited, status=0/SUCCESS)<br clear="none">> Main PID: 853 (code=exited, status=0/SUCCESS)<br clear="none">> <br clear="none">> [<a shape="rect" ymailto="mailto:root@f21" href="mailto:root@f21">root@f21</a> ylu]# cat /etc/systemd/system/tst.path<br clear="none">> <br clear="none">> [Unit]<br clear="none">> Description=Activate test Service <br clear="none">> # DefaultDependencies=no<br clear="none">> <br clear="none">> [Path]<br clear="none">> PathExists=/var/tmp/tst0<br clear="none">> <br clear="none">> Unit=tst.service<br clear="none">> <br clear="none">> # [Install]<br clear="none">> # WantedBy=multi-user.target<br clear="none"><br clear="none"> No install instructions for tst.path.<div class="yqt7574843958" id="yqtfd74018"><br clear="none"> <br clear="none">> <br clear="none">> [<a shape="rect" ymailto="mailto:root@f21" href="mailto:root@f21">root@f21</a> ylu]# cat /etc/systemd/system/tst.service <br clear="none">> <br clear="none">> [Unit]<br clear="none">> Description=Tst Controller Service<br clear="none">> <br clear="none">> [Service]<br clear="none">> Type=oneshot<br clear="none">> Environment=TERM=linux<br clear="none">> # NotifyAccess=all<br clear="none">> ExecStart=/usr/sbin/tst.sh<br clear="none">> <br clear="none">> [Install]<br clear="none">> Also=tst.path<br clear="none">> WantedBy=multi-user.target</div><br clear="none"><br clear="none"> tst.service install instruction.<br clear="none"><br clear="none">-- <br clear="none">Tomasz Torcz ,,If you try to upissue this patchset I shall be seeking<br clear="none">xmpp: <a shape="rect" ymailto="mailto:zdzichubg@chrome.pl" href="mailto:zdzichubg@chrome.pl">zdzichubg@chrome.pl</a> an IP-routable hand grenade.'' -- Andrew Morton (LKML)<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="mailto:systemd-devel@lists.freedesktop.org">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><div class="yqt7574843958" id="yqtfd46383"><br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>