Using Upstart
![]()
Typical Upstart job files differ, depending on the type of terminal and whether the availability of the terminal is assured.
To use ttyrun with an Upstart job file for mingetty, use a file of this form:
start on runlevel [2345]
stop on runlevel [01]
respawn
normal exit <value>
exec /sbin/ttyrun -e <value> <dev> /sbin/mingetty --noclear %tTo use ttyrun with an Upstart job file for agetty, use a file of this form:
start on runlevel [2345]
stop on runlevel [01]
respawn
normal exit <value>
exec /sbin/ttyrun -e <value> <dev> /sbin/agetty -L 9600 <term> %t- <value>
- specifies an integer in the range 1 to 255. See the ttyrun man page for details.
- <dev>
- specifies the device node of the terminal, omitting the leading /dev/.
For example, instead of specifying /dev/sclp_line0,
specify
sclp_line0. - <term>
- specifies the terminal name. The terminal name indicates the capabilities
of the terminal device. Examples for terminal names are
linux,dumb,xterm, orvt220.With mingetty, you must explicitly export the TERM environment variable with the terminal name.mingetty example:# export TERM=linux
- %t
- is a variable that the ttyrun program resolves to the device node that is specified for <dev>.
By default, ttyrun runs quietly. Use the verbose option, -V, to obtain syslog messages, for example, if a terminal device is not available.
See the init(5) man page for details about the individual lines in the Upstart job file.
Example
hvc0 for
user logins with mingetty and to take into account that the terminal
might not be operational, the complete Upstart job file could look
like this: start on runlevel [2345]
stop on runlevel [01]
respawn
normal exit 123
exec /sbin/ttyrun -V -e 123 hvc0 /sbin/mingetty --noclear %tEnabling hvc1 through hvc7,
requires a similar Upstart job file for each terminal device, with
the respective device node specified on the exec line. These terminal
devices are operational only in a z/VM® environment. In addition,
they depend on the hvc_iucv= kernel parameter. The verbose option, -V, causes a syslog entry if the hvc0 terminal
device is not available.