added /usr/etc /usr/local/etc tests for config

This commit is contained in:
Harald Hope 2023-12-15 16:57:44 -08:00
parent 3b1dc1937a
commit de24236606
2 changed files with 11 additions and 3 deletions

4
pinxi
View file

@ -1171,6 +1171,10 @@ sub set {
@config_files = ( @config_files = (
qq(/etc/$self_name.conf), qq(/etc/$self_name.conf),
qq(/etc/$self_name.d/$self_name.conf), qq(/etc/$self_name.d/$self_name.conf),
qq(/usr/etc/$self_name.conf),
qq(/usr/etc/$self_name.d/$self_name.conf),
qq(/usr/local/etc/$self_name.conf),
qq(/usr/local/etc/$self_name.d/$self_name.conf),
qq($user_config_dir/$self_name.conf) qq($user_config_dir/$self_name.conf)
); );
# Config files should be passed in an array as a param to this function. # Config files should be passed in an array as a param to this function.

View file

@ -15,7 +15,7 @@
.\" with this program; if not, write to the Free Software Foundation, Inc., .\" with this program; if not, write to the Free Software Foundation, Inc.,
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.\" .\"
.TH INXI 1 "2023\-12\-12" "inxi" "inxi manual" .TH INXI 1 "2023\-12\-15" "inxi" "inxi manual"
.SH NAME .SH NAME
inxi \- Command line system information script for console and IRC inxi \- Command line system information script for console and IRC
@ -2977,6 +2977,10 @@ override some global configuration items from the package's default
\fB/etc/inxi.conf\fR file but don't want to lose your changes on a package \fB/etc/inxi.conf\fR file but don't want to lose your changes on a package
update. update.
In case the distro is using either \fB/usr/etc\fR or \fB/usr/local/etc\fR as non
core tool default location, inxi will use those paths instead, with the
\fBinxi.d/inxi.conf\fR override option.
You can also override, per user, with a user configuration file found in one of You can also override, per user, with a user configuration file found in one of
the following locations (inxi will store its config file using the following the following locations (inxi will store its config file using the following
precedence): precedence):