<div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif;font-size:large"><div class="gmail_default">Thank you for the suggestions.</div><div class="gmail_default">But with this suggestion i.e., generator file, I again need to add/modify some files.</div><div class="gmail_default"><br></div><div class="gmail_default">All I'm looking into is I mount my binaries and unit files under /mnt. By setting any environment variable like SYSTEMD_UNIT_PATH, systemd should pick the unit files from /mnt and execute my binaries as per the instructions given in unit file.</div><div class="gmail_default"><br></div><div class="gmail_default">In normal init.d systems, we have environment variables like PATH & LD_LIBRARY_PATH. <br></div><div class="gmail_default">No matter where I place my new executable or library, adding new path into these environment variables is enough to execute or link the library.</div><div class="gmail_default"><br></div><div class="gmail_default">Probably this kind of facility is not available in Systemd init systems.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font style="font-family:times new roman,serif" size="2"></font><font face="times new roman,serif"><font size="4">--<br>Regards,<br><br>Raghavendra. H. R<br>(Raghu)</font><br></font></div></div></div></div>
<br><div class="gmail_quote">On Wed, Sep 21, 2016 at 10:40 PM, Andrei Borzenkov <span dir="ltr"><<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="tel:21.09.2016%2014" value="+12109201614">21.09.2016 14</a>:26, Raghavendra. H. R пишет:<br>
<span class="">> Hi,<br>
><br>
> I'm newbie with systemd boot system and I need help in resolving one issue.<br>
><br>
> I would like to create a service under a customized path Eg:/mnt and<br>
> systemd should be able to pick my unit file from this.<br>
><br>
</span>> I tried by setting *Environment=SYSTEMD_UNIT_<wbr>PATH=/mnt *from the<br>
> console<br>
<br>
This should be set in environment of srarted systemd, which in case of<br>
systemwide init effectively means either you need to use some wrapper to<br>
set it and exec systemd or hack initrd.<br>
<br>
Also SYSTEMD_UNIT_PATH does not really play nicely with priorities of<br>
unit locations (run-time vs. sysadmin vs. shipped).<br>
<br>
May be it is simpler to install generator that copies your unit<br>
definition in standard location. This guarantees it is available before<br>
systemd starts.<br>
</blockquote></div><br></div></div>