As of s390-tools 1.9 (kernel 2.6.34), the ttyrun program can run on target systems to start a program on a terminal device; for example, a getty program.
ttyrun is typically started during the system startup procedures and is used to prevent a respawn through the system startup procedures when a terminal is not available.
ttyrun syntax >>-ttyrun--+-----+--+--------------+-- <term>-- <prog>--+-----------------+->< '- -V-' '- -e <status>-' '- <prog_options>-'
You can use this status value in an Upstart job file to prevent respawning.
Do not inadvertently override these return values with the -e option.
# systemctl enable ttyrun-getty@hvc1.service
At the next system start,
systemd starts the ttyrun service for hvc1. The ttyrun service starts a getty only
if this terminal is available.# systemctl start ttyrun-getty@hvc1.service
h1:2345:respawn:/sbin/ttyrun hvc1 /sbin/agetty -L 9600 %t linux
ttyrun
prevents the agetty program from respawning if hvc1 is
not available.respawn
normal exit 42
exec /sbin/ttyrun -e 42 hvc1 /sbin/agetty -L 9600 %t linux
With the normal exit statement, you specify an exit status that prevents Upstart from respawning the program. To prevent respawning with ttyrun, you must specify the same value for the -e option and for the exit status. The example uses 42.