Respect sysconfdir for configuration file location

The sysconfdir is used if it exists, otherwise it fallbacks
to the previous default /etc.
This commit is contained in:
James Sanderson 2016-11-06 19:30:01 +00:00 • committed by Andrea Mazzoleni
parent 8f625f2be4
commit ee1aa840f1
5 changed files with 40 additions and 16 deletions

View file

@ -694,9 +694,11 @@ Options
SnapRAID provides the following options:
-c, --conf CONFIG
Selects the configuration file. If not specified it's assumed
the file "/etc/snapraid.conf" in Unix, and "snapraid.conf" in
the current directory in Windows.
Selects the configuration file to use. If not specified in Unix
it's used the file "/usr/local/etc/snapraid.conf" if it exists,
or "/etc/snapraid.conf" otherwise.
In Windows it's used the file "snapraid.conf" in the same
directory of "snapraid.exe".
-f, --filter PATTERN
Filters the files to process in "check" and "fix".
@ -930,8 +932,10 @@ Configuration
SnapRAID requires a configuration file to know where your disk array
is located, and where storing the parity information.
This configuration file is located in /etc/snapraid.conf in Unix or
in the execution directory in Windows.
In Unix it's used the file "/usr/local/etc/snapraid.conf" if it exists,
or "/etc/snapraid.conf" otherwise.
In Windows it's used the file "snapraid.conf" in the same
directory of "snapraid.exe".
It should contain the following options (case sensitive):