Patch from "Alan Curry" <pacman-radius@cqc.com>
authoraland <aland>
Sat, 12 Aug 2000 18:20:27 +0000 (18:20 +0000)
committeraland <aland>
Sat, 12 Aug 2000 18:20:27 +0000 (18:20 +0000)
Allows autoconf to create raddb/radiusd.conf from a '.in' file.
This causes it to use local path names for the configuration
variables, which are more likely to be correct than hard-coded ones.

Makefile
configure.in
raddb/radiusd.conf.in [moved from raddb/radiusd.conf with 97% similarity]

index e2e6dc2..75b5523 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,8 @@ install:
        install -d -m 755       $(raddbdir); \
        cd raddb; \
        for i in [a-c]* [e-z]*; do \
-               [ ! -f $(raddbdir)/$$i ] && install -m 644 $$i $(raddbdir); \
+               [ $$i != radiusd.conf.in -a ! -f $(raddbdir)/$$i ] && \
+                install -m 644 $$i $(raddbdir); \
        done; \
        for i in dictionary*; do \
                [ ! -f $(raddbdir)/$$i ] && install -m 644 $$i $(raddbdir); \
index 09bf8d3..006c309 100644 (file)
@@ -624,7 +624,8 @@ AC_OUTPUT(\
        ./src/main/radtest \
        ./scripts/rc.radiusd \
        ./scripts/radwatch \
-       ./scripts/check-radiusd-config
+       ./scripts/check-radiusd-config \
+       ./raddb/radiusd.conf
 )
 
 AC_OUTPUT_COMMANDS([echo timestamp > src/include/stamp-h])
similarity index 97%
rename from raddb/radiusd.conf
rename to raddb/radiusd.conf.in
index 69e5663..023d497 100644 (file)
 #      modules that ask for it.
 #
 
+# Stuff from autoconf
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+sysconfdir = @sysconfdir@
+localstatedir = @localstatedir@
+sbindir = @sbindir@
+logdir = @logdir@
+raddbdir = @raddbdir@
+radacctdir = @radacctdir@
+
 #
 #  Location of config and logfiles.
 #
-confdir    = /etc/raddb
+confdir    = ${raddbdir}
 
-log_dir           = /var/log
-acct_dir   = ${log_dir}/radacct
-run_dir    = /var/run
+log_dir           = ${logdir}
+run_dir    = ${localstatedir}/run
 
 #
 #  pidfile: Where to place the PID of the RADIUS server.
@@ -103,12 +112,12 @@ wtmpfile   = ${log_dir}/radutmp
 #
 #  Each NAS may be given it's own 'detail' directory.
 #
-detailfile = /var/log/radacct/%n/detail
+detailfile = ${radacctdir}/%n/detail
 
 #
 #  Which program to execute check doing concurrency checks.
 #
-checkrad   = /usr/local/sbin/checkrad
+checkrad   = ${sbindir}/checkrad
 
 #
 #  Core dumps are a bad thing.  This should only be set to 'yes'