<div dir="ltr">Gentle Reminder mail for looking into the issue.<div><br></div><div>Thanks</div><div>Navneet</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 18, 2016 at 11:05 PM, Navneet Sinha <span dir="ltr"><<a href="mailto:nnavneetsinha1001@gmail.com" target="_blank">nnavneetsinha1001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Any updates ?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 15, 2016 at 11:16 AM, Navneet Sinha <span dir="ltr"><<a href="mailto:nnavneetsinha1001@gmail.com" target="_blank">nnavneetsinha1001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:12.8px">I have systemd service, say foo.service. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><b><i>Service file</i></b></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div><div style="font-size:12.8px"><font face="georgia, serif"> [Unit]</font></div><div style="font-size:12.8px"><font face="georgia, serif"> Description=Foo agent.</font></div><div style="font-size:12.8px"><font face="georgia, serif"> After=fooAfter.service</font></div><div style="font-size:12.8px"><font face="georgia, serif"> Before=fooBefore1.service</font></div><div style="font-size:12.8px"><font face="georgia, serif"> Before=fooBefore2.service</font></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div style="font-size:12.8px"><font face="georgia, serif"> [Service]</font></div><div style="font-size:12.8px"><font face="georgia, serif"> # During boot the foo.sh script reads input from /dev/console. If the user</font></div><div style="font-size:12.8px"><font face="georgia, serif"> # hits <ESC>, it will skip waiting for foo and foo2 to startup.</font></div><div style="font-size:12.8px"><font face="georgia, serif"> Type=oneshot</font></div><div style="font-size:12.8px"><font face="georgia, serif"> StandardInput=tty</font></div><div style="font-size:12.8px"><font face="georgia, serif"> StandardOutput=tty</font></div><div style="font-size:12.8px"><font face="georgia, serif"> ExecStart=/usr/bin/foo.sh start</font></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div style="font-size:12.8px"><font face="georgia, serif"> RemainAfterExit=True</font></div><div style="font-size:12.8px"><font face="georgia, serif"> ExecStop=/usr/bin/foo.sh stop</font></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div style="font-size:12.8px"><font face="georgia, serif"> [Install]</font></div><div style="font-size:12.8px"><font face="georgia, serif"> WantedBy=multi-user.target</font></div></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div style="font-size:12.8px"><font face="georgia, serif"><br></font></div><div style="font-size:12.8px"><font face="georgia, serif"><b><i>start function from foo.sh</i></b></font></div><div><font face="georgia, serif"><br></font></div><div><div><font face="georgia, serif">start() {</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"> echo -n "This is a fake systemd service"</font></div><div><font face="georgia, serif"> success</font></div><div><font face="georgia, serif"> echo</font></div><div><font face="georgia, serif"> exit 0</font></div></div><div><font face="georgia, serif">}</font></div><div><br></div><div>During boot up this service file is being executed</div><div>Following is what I am seeing : </div><div><br></div><div>"2016-01-14 20:24:39.693603 11760 pexpect 2 c:abc3#1 received:<b> 'This is a fake s'</b></div><div><br></div><div>Instead I expected <b>"<span style="font-family:georgia,serif">This is a fake systemd service</span>"</b> and in next line <b>"[ OK ]"</b></div><div><br></div><div><span style="font-size:12.8px"><b>systemd version </b>is : <font face="tahoma, sans-serif">systemd-201-2.fc18.9.i686</font></span><br></div><div><span style="font-size:12.8px"><br></span></div><div><b>systemd configuration</b> for the system, I am using is :</div><div><span style="font-size:12.8px"><br></span></div><div><font face="tahoma, sans-serif"><span style="font-size:12.8px">systemd.default_standard_</span><span style="font-size:12.8px">output=tty</span><br></font></div><div><span style="font-size:12.8px"><font face="tahoma, sans-serif">systemd.show_status=0</font></span></div><div><br></div><div><br></div><div>On further debugging, what I see if I add just a "sleep 1" after echo. Missing echo Messages starts showing up during boot up OR if I remove "StandardInput" attribute from the service file.</div><div><br></div><div>So, the issue I am suspecting has something to do with this process becoming the controlling process for the terminal( as StandardInput is set ).</div><div><br></div><div><div style="font-size:12.8px"><font face="georgia, serif"><b><i>start function from foo.sh after adding "sleep 1"</i></b></font></div><div><font face="georgia, serif"><br></font></div><div><div><font face="georgia, serif">start() {</font></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif"> echo -n "This is a fake systemd service"</font></div><div><font face="georgia, serif"> success</font></div><div><font face="georgia, serif"> echo</font></div><div><font face="georgia, serif"> <b>sleep 1</b></font></div><div><font face="georgia, serif"> exit 0</font></div></div><div><font face="georgia, serif">}</font></div></div><div><br></div><div>Can somebody explain this and also suggest a better solution, if there is.</div><div><br></div><div>Thanks</div><span><font color="#888888"><div>Navneet</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>