MINOR: config: add a new "default-path" global directive
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Apr 2021 18:29:11 +0000 (20:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 Apr 2021 09:30:13 +0000 (11:30 +0200)
commit8a022d5049270196fc039352b6434616f83463ca
tree8712f6e8703b0ff3f743b3bc2fba352cdba49a32
parentda543e130cbaab91c96b1ecb96118141441bce4a
MINOR: config: add a new "default-path" global directive

By default haproxy loads all files designated by a relative path from the
location the process is started in. In some circumstances it might be
desirable to force all relative paths to start from a different location
just as if the process was started from such locations. This is what this
directive is made for. Technically it will perform a temporary chdir() to
the designated location while processing each configuration file, and will
return to the original directory after processing each file. It takes an
argument indicating the policy to use when loading files whose path does
not start with a slash ('/').

A few options are offered, "current" (the default), "config" (files
relative to config file's dir), "parent" (files relative to config file's
parent dir), and "origin" with an absolute path.

This should address issue #1198.
doc/configuration.txt
src/cfgparse.c