|
root / base / usr / src / zyginit / services / vt3-login
vt3-login Plain Text 41 lines 1.2 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Text login on virtual terminal 3 (reachable with Ctrl-Alt-F3).
#
# A copy of console-login bound to /dev/vt/3 instead of /dev/console, giving a
# text-console fallback alongside the graphical greeter. ttymon self-claims
# /dev/vt/3 as its ctty (opens it as session leader, no O_NOCTTY), so no
# zyginit [tty] feature is needed. Requires vtdaemon: it configures the VTs
# (VT_CONFIG) and arbitrates the Ctrl-Alt-F# hotkey switch to reach this VT.
[service]
name = "vt3-login"
description = "Text login on VT3 (Ctrl-Alt-F3)"
type = "daemon"

[exec]
start = "/etc/zyginit/services/vt3-login/start.sh"

[dependencies]
requires = ["utmpd", "vtdaemon"]

[contract]
param = ["inherit", "noorphan"]
fatal = ["hwerr"]

[restart]
on = "failure"
delay = 5
max_retries = 3
#!/bin/zsh
# Text getty on /dev/vt/3. write_login_utmpx (shared with console-login) writes
# the LOGIN_PROCESS utmpx entry that illumos login(1) requires; ttymon updates
# but never creates it. Then exec ttymon so it becomes the supervised process.
/etc/zyginit/services/console-login/write_login_utmpx v3 vt/3 $$

exec /usr/lib/saf/ttymon \
    -g \
    -d /dev/vt/3 \
    -l console \
    -m ldterm,ttcompat \
    -T sun-color \
    -h \
    -p "hammerhead vt3 login: "