bareos: master 9555e7cd

Author Committer Branch Timestamp Parent
joergs mvwieringen master 2016-05-12 20:42 master 9d6c3e6c Pending
Changeset Improved config file handling.

The old implementation could not distinguish between a config file given
as command line parameter and the compiled default.

Older versions of bareos (15.2.x) did handle command line parameter
as follows:

If the parameter is a path (contains a "/"), it will be as expected (absolute path
or path relative to the current directory).

If the parameter is a filename (does not contain a "/"), it will be treated as relative
to the compiled config directory (e.g. /etc/bareos/).

This is inconsistent.

A prior patch changed this behavior. However, this patch extends the
search for the config file.

No config file paramter given:
  * use default config file, fall back to default config include
    directories.
Config file parameter is given and it is an existing file:
  * this file will be used. It can be specified either an absolute or a
    relative path (relative to the current directory).
Config file parameter is given and it is a directory:
  * tries to find the default config filename in the configured
    directory. If that fails, it tries to find the config include
    directories under the configured directory.
Parameter is given but does not exists:
  * For backward compability (for programs not adapted to the new
    mechanism like bat and tray-monitor):
    * try to find the given path relative to the default config directory.
mod - src/console/console.c Diff File
mod - src/console/console_conf.c Diff File
mod - src/console/console_conf.h Diff File
mod - src/dird/dird.c Diff File
mod - src/dird/dird_conf.c Diff File
mod - src/dird/dird_conf.h Diff File
mod - src/filed/filed.c Diff File
mod - src/filed/filed.h Diff File
mod - src/filed/filed_conf.c Diff File
mod - src/filed/filed_conf.h Diff File
mod - src/lib/bsys.c Diff File
mod - src/lib/parse_conf.c Diff File
mod - src/lib/parse_conf.h Diff File
mod - src/stored/bcopy.c Diff File
mod - src/stored/bextract.c Diff File
mod - src/stored/bls.c Diff File
mod - src/stored/bscan.c Diff File
mod - src/stored/btape.c Diff File
mod - src/stored/stored.c Diff File
mod - src/stored/stored_conf.c Diff File
mod - src/stored/stored_conf.h Diff File