[systemd-devel] "StandardOutput=console" don't work as expected

Filipe Brandenburger filbranden at google.com
Wed Dec 30 09:51:22 PST 2015


Hi,

On Wed, Dec 30, 2015 at 2:52 AM, Michael Chapman <mike at very.puzzling.org> wrote:
> On Wed, 30 Dec 2015, Reindl Harald wrote:
>>> >  i am asking for StandardOutput=console get piped to the terminal
>>> >  systemctl was called - the rest is done by crond as all the years
>>> > before
>>>
>>>  That isn't possible at the moment, and I doubt it will ever be
>>>  supported. The service is executed by systemd, not systemctl, and there
>>>  is no communication channel to return a stream of output from the
>>>  command back to systemctl.
>>
>> since "systemctl start" on the shell waits until the "oneshot" service is
>> finished it can't be impossible that pid 1 geives back the tasks output
>
> Well, it's "impossible" in the sense that systemd doesn't have any code to
> do that, no matter how much you might wish it did.

There's an item in the TODO list for `systemctl start -v ...` that
shows a log of the service in systemctl output:
https://github.com/systemd/systemd/blob/c57d67f718077aadee4e2d0940fb87f513b98671/TODO#L132

This might get closer to what you're suggesting here (even without
StandardOutput=console), though it's still about logs and not really
raw output.

As the TODO item suggests, it's tricky to implement correctly, so not
sure how long until it will be available...

Cheers,
Filipe


More information about the systemd-devel mailing list