Skip to content

consolefont: allow passing extra arguments to setfont#1001

Open
Feasuro wants to merge 1 commit intoOpenRC:masterfrom
Feasuro:consolefont-args
Open

consolefont: allow passing extra arguments to setfont#1001
Feasuro wants to merge 1 commit intoOpenRC:masterfrom
Feasuro:consolefont-args

Conversation

@Feasuro
Copy link
Copy Markdown

@Feasuro Feasuro commented Apr 9, 2026

Summary

This change introduces support for an optional customflags variable in /etc/conf.d/consolefont, allowing users to pass additional arguments to the setfont command.

Motivation

Currently, the consolefont OpenRC service does not provide a way to customize the arguments passed to setfont. Users who need non-default behavior (for example, using the -d flag for double-size fonts) must modify /etc/init.d/consolefont directly.

Since this file is owned by the package, such changes are overwritten on upgrade, forcing users to rely on fragile workarounds such as patching via package manager hooks.

Proposed solution

Introduce a new optional variable:

customflags=""

This variable is sourced from /etc/conf.d/consolefont and appended to the setfont invocation:

setfont $customflags $consolefont $param -C $ttydev$x >/dev/null

Benefits

  • Enables customization without modifying init scripts
  • Preserves existing default behavior when unset
  • Aligns with existing OpenRC patterns of exposing command arguments via /etc/conf.d/*
  • Eliminates the need for downstream patching or hooks

Backward compatibility

No changes in behavior for existing users. If customflags is unset or empty, the command behaves exactly as before.

Example usage

To enable double-size console fonts:

consolefont="Lat2-Terminus16"
customflags="-d"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant