ttylogin
service management via /etc/ttys
ttylogin
services can of course be managed just like ordinary services, enabling them so that they auto-start at bootup and starting and stopping them with normal system-control
commands.
The preset
command and the normal preset mechanisms can pre-set what services are enabled when they are installed, with (for example) lines in /etc/system-control/presets/60-ttys.preset
saying:
enable ttylogin@ttyv1 enable cyclog@ttylogin@ttyv1
However, one might decide to retain the BSD /etc/ttys
mechanism as the master settings list for all terminals.
This is still done with the preset
command, which can also use the on/off information for individual virtual terminals that is stored in /etc/ttys
as an alternative source of preset information for enabling/disabling the matching ttylogin
services.
In order to determine presets using /etc/ttys
one runs two things:
In order to first enable or disable the relevant ttylogin@ttyv{0,1,2,3,4,5,6,7,8}.service
service one runs
system-control preset --ttys --prefix ttylogin@ ttyv{0,1,2,3,4,5,6,7,8} system-control preset --ttys --prefix cyclog@ttylogin@ ttyv{0,1,2,3,4,5,6,7,8}
This takes the preset information given in the matching ttyv{0,1,2,3,4,5,6,7,8}
records in /etc/ttys
and applies it to both the main login services and their associated logging services.
In order to immediately start or stop the relevant service one also runs
system-control reset ttylogin@ttyv{0,1,2,3,4,5,6,7,8} system-control reset cyclog@ttylogin@ttyv{0,1,2,3,4,5,6,7,8}
Note:
This allows one to list both kernel and user-space virtual terminals in /etc/ttys
, alongside one another.