conf: add missing passenv to tty blocks

The line-based format has had the flag since v4.4 (issue #286), where
it prepends -p to the built-in getty, which turns it into login -p and
passes the environment on.  The block format was written from the three
documented tty variants and the flags listed in the tty documentation,
and passenv was in neither, so it was left out.  Converting a tty line
that used it therefore lost it, with nothing said.

It only reaches the built-in getty.  An external getty is handed its
arguments through command, so there is nowhere to put a -p, and the
setting is refused with a warning rather than quietly ignored.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-08-05 17:59:11 +02:00
1 parent 96c5b4b031
commit 6b77a16f8b
10 files changed
+109 -24

No files matched your search

+2
View File
@@ -8,6 +8,8 @@ All relevant changes are documented in this file.
### Changes
- The `tty` block takes `passenv`, which the line-based format has had
since v4.4 (issue #286) and the block format was missing
- New `provides` setting for run/task/service/sysv blocks, naming
conditions the service asserts in addition to its own `pid/<ident>`.
Lets variants of one service, qualified with `if`, share the barrier
+8
View File
@@ -216,6 +216,14 @@ become
notty = true
}
The bare flags keep their names as booleans: `noclear`, `nowait`,
`nologin`, `passenv`, `rescue`, e.g. `passenv` becomes
`passenv = true`.
A `tty` block is named by the device, not the title, so all three above
show up as `tty:ttyS0` and the like in `initctl`. The title still has
to be unique within the file.
Top-level directives
--------------------
+1
View File
@@ -24,6 +24,7 @@ Settings common to all three:
| `noclear` | | Do not clear the TTY after each session |
| `nowait` | | Do not wait for Enter before the login prompt |
| `nologin` | | Skip login, give a shell straight away |
| `passenv` | | Pass the environment on to `login`, built-in getty only |
The `device` variant takes two more: