[systemd-devel] Howto get the original TTY in a service

Martin Vogt mvogt1 at gmail.com
Tue Jan 26 07:33:00 PST 2016


On Tue, Jan 26, 2016 at 2:35 PM, Mantas Mikulėnas <grawity at gmail.com> wrote:

> On Tue, Jan 26, 2016 at 3:31 PM, Martin Vogt <mvogt1 at gmail.com> wrote:
>
>>
>> I need the console in a shutdownselect.service file (and in the script)
>> where the user pressed CTRL+ALT+DEL.
>>
>> I cannot figure out how to do it.
>>
>> The script started from systemd gets for the tty command "not a tty"
>>
>
> StandardOutput=tty? /sys/class/tty/tty0/active?
>
>
Ok, thanks.
The /sys/class/tty/tty0/active entry works for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160126/f8f75e0b/attachment.html>


More information about the systemd-devel mailing list