Files
finit/doc/config
Joachim Wiberg 197c5767ea Switch from PTY to pipe for service log redirection
The PTY approach caused isatty() to return true for services using
the log directive, triggering programs like fprintd (using glib) to
emit ANSI escape codes and other TTY-specific formatting in syslog.

Using a standard pipe ensures isatty() correctly returns false, so
programs produce plain text output suitable for logging.

For services that require line-buffered output, users can wrap the
command with `stdbuf -oL` as documented in doc/config/logging.md.

Fixes #455

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-12-06 15:41:30 +01:00
..
…
…
…
…
…
…

This section provides an overview of Finit's configuration system. For detailed information on specific topics, see the individual sections in the navigation menu.

Configuration File Syntax

The file format is line based, empty lines and comments, lines starting with #, are ignored. A configuration directive starts with a keyword followed by a space and the rest of the line is treated as the value.

As of Finit v4.4, configuration directives can be broken up in multiple lines using the continuation character \, and trailing comments are also allowed. Example:

# Escape \# chars if you want them literal in, e.g., descriptions
service name:sysklogd [S123456789]   \
    env:-/etc/default/sysklogd       \
    syslogd -F $SYSLOGD_ARGS         \
    -- System log daemon \# 1   # Comments allowed

The .conf files /etc/finit.conf and /etc/finit.d/* support many directives. Some are restricted, e.g., only available at bootstrap, runlevel S. Read on in Files & Layout for more on how to structure your .conf files.

For details on restrictions, see Limitations.