Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid the hardcoding of /usr/local/etc
On Linux systems, sysconfdir is usually /etc, while all the
documentation refers to /usr/local/etc.

Switch the two manpages that need to refer to the config file location
to autoconf-substituted variables, and remove a spurious reference from
the example config.
  • Loading branch information
Faidon Liambotis committed Sep 5, 2019
1 parent e3c8363 commit 4add5ea
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -22,6 +22,8 @@ TAGS
radsecproxy
radsecproxy-conf
radsecproxy-hash
radsecproxy.8
radsecproxy.conf.5
build-aux/*
tests/t_fticks
tests/t_rewrite
Expand Down
6 changes: 3 additions & 3 deletions README
Expand Up @@ -13,9 +13,9 @@ support. Without any special options to configure, all transports
supported by the system will be enabled. See the output from
"./configure --help" for how to change this.

To use radsecproxy you need to create a config file which is normally
found in /usr/local/etc/radsecproxy.conf. You can also specify the
location with the "-c" command line option (see below). For further
To use radsecproxy you need to create a config file which is normally found in
/etc/radsecproxy.conf or /usr/local/etc/radsecproxy.conf. You can also specify
the location with the "-c" command line option (see below). For further
instructions, please see the enclosed example file and the manpages
radsecproxy(8) and radsecproxy.conf(5).

Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Expand Up @@ -92,6 +92,16 @@ if test "x$dtls" = "xyes" ; then
TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS"
fi

dnl Substitute variables such as sysconfdir
AC_CONFIG_FILES([radsecproxy.8 radsecproxy.conf.5])

dnl Expand sysconfdir early to avoid two layers of substitution
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
SYSCONFDIR=`eval echo $sysconfdir`
SYSCONFDIR=`eval echo $SYSCONFDIR`
AC_SUBST(SYSCONFDIR)

AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
AX_CHECK_SSL
Expand Down
2 changes: 1 addition & 1 deletion radsecproxy.8 → radsecproxy.8.in
Expand Up @@ -84,7 +84,7 @@ This signal is ignored.

.SH "FILES"
.TP
.B /usr/local/etc/radsecproxy.conf
.B @SYSCONFDIR@/radsecproxy.conf
.sp
The default configuration file.

Expand Down
3 changes: 1 addition & 2 deletions radsecproxy.conf-example
@@ -1,5 +1,4 @@
# Master config file, must be in /usr/local/etc/radsecproxy or specified with -c option
# All possible config options are listed below
# Master config file, all possible config options are listed below

# First you may define any global options, these are:
#
Expand Down
4 changes: 2 additions & 2 deletions radsecproxy.conf.5 → radsecproxy.conf.5.in
Expand Up @@ -6,7 +6,7 @@ radsecproxy.conf \- Radsec proxy configuration file
.SH DESCRIPTION
When the proxy server starts, it will first check the command line arguments,
and then read the configuration file. Normally radsecproxy will read the
configuration file \fI/usr/local/etc/radsecproxy.conf\fR. The command line
configuration file \fI@SYSCONFDIR@/radsecproxy.conf\fR. The command line
\fB\-c\fR option can be used to instead read an alternate file (see
\fBradsecproxy\fR(8) for details).

Expand Down Expand Up @@ -79,7 +79,7 @@ be included. The value can be a single file, or it can use normal shell globbing
to specify multiple files, e.g.:

.RS
include /usr/local/etc/radsecproxy.conf.d/*.conf
include @SYSCONFDIR@/radsecproxy.conf.d/*.conf
.RE

The files are sorted alphabetically. Included files are read in the order they
Expand Down

0 comments on commit 4add5ea

Please sign in to comment.