Skip to content

main/doas: always read /etc/doas.conf, then /etc/doas.d/*.conf if exist

Jakub Jirutka requested to merge jirutka/aports:doas-confdir into master

The current behaviour of the configuration directory was required by the upstream, but it doesn't conform to established conventions used by virtually all programs on Linux that support modular configuration, and what the users naturally expect. Also, when someone used to vanilla OpenDoas or doas on BSD comes to Alpine, the way they're used to configuring it (via /etc/doas.conf) will no work without notice! It has already caused some problems and confusion.

The current behaviour is: if /etc/doas.d exists, there must be at least one *.conf file and /etc/doas.conf is ignored.

Since it doesn't look like the upstream will ever merge this, better to fix this patch to work as it should from the beginning...

This new behaviour: /etc/doas.conf must always exist (as in unpatched OpenDoas) and will be read first; if /etc/doas.d exists and there are any *.conf files, they will be loaded as well.

This commit also cleans up these messy install scripts.

Supersedes !46996 (closed)
Resolves #14085 (closed)

Edited by Jakub Jirutka

Merge request reports