[systemd-devel] echo message not coming on terminal with systemd

Navneet Sinha nnavneetsinha1001 at gmail.com
Thu Dec 17 22:51:17 PST 2015


On Fri, Dec 18, 2015 at 11:17 AM, Johan Ouwerkerk <jm.ouwerkerk at gmail.com>
wrote:

> You say this part:
>
> >         echo -n $"$msg (press ESC to skip): " > /dev/console
>
> Displays fine.
>
> But these:
> >                     echo "[ OK ]"
> >                     echo
>
> And these:
> >                     echo "[ FAILED ]"
> >                     echo "This is failure"
>
> Don't.
>
Hmmm... Not actually any message before that if statement( whether or not
redirected to /dev/console or not, it doesn't matter ) or as soon as the
wfw process exits or gets killed( that's what those if /else  is checking
for )

> Spotting the obvious difference: only the first (which you *do* see)
> is redirected to /dev/console.
>
> So the obvious fix would seem to be:
>
> echo "[OK]" > /dev/console
> echo "" > /dev/console
>
> And:
>
> echo "[FAILED]" > /dev/console
> echo "This is failure" >/dev/console
>
> ...
>
> Wouldn't it?
>
No it doesn't fix it. Secondly, my main problem is why it is not working
with systemd. When, I was using this script as initscript before porting
this to systemd. I was able to see all echo messages.
Secondly, what I have observed is as soon as the wfw process exits or gets
killed. echo messages don't come.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20151218/d53ebbc9/attachment.html>


More information about the systemd-devel mailing list