Author: biurrun Date: Tue Oct 6 13:39:41 2009 New Revision: 1020 Log: By default, place configuration files in the system configuration directory as defined in the build environment (/usr/local/etc), not in the global system configuration directory (/etc). Modified: trunk/configure.ac trunk/docs/config.txt trunk/include/global.h trunk/pisacd/Makefile.am trunk/pisand/Makefile.am trunk/pisasd/Makefile.am Modified: trunk/configure.ac ============================================================================== --- trunk/configure.ac Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/configure.ac Tue Oct 6 13:39:41 2009 (r1020) @@ -190,6 +190,13 @@ AC_SUBST(PISA_PERFORMANCE_LIB_STATIC, "$PISA_PERFORMANCE_LIB/libperformance.a") AC_SUBST(PISA_PERFORMANCE_LIB_DYNAMIC, "$PISA_PERFORMANCE_LIB/libperformance.so") +if test "x$prefix" = "xNONE"; then + prefix="$ac_default_prefix" +fi + +AC_DEFINE_UNQUOTED(SYSCONFDIR, $(eval echo $sysconfdir)) +AH_TEMPLATE([SYSCONFDIR]) + AC_CONFIG_FILES([ include/Makefile libpisa/Makefile Modified: trunk/docs/config.txt ============================================================================== --- trunk/docs/config.txt Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/docs/config.txt Tue Oct 6 13:39:41 2009 (r1020) @@ -10,7 +10,7 @@ Each option can be overrided by an explicit command line argument. See usage message of each daemon executing it with the option '-h'. -* Default directory for configuration files: /etc/pisa +* Default directory for configuration files: /usr/local/etc/pisa * PISA neighbor daemon configurations (pisand.conf) Modified: trunk/include/global.h ============================================================================== --- trunk/include/global.h Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/include/global.h Tue Oct 6 13:39:41 2009 (r1020) @@ -164,9 +164,9 @@ */ #define PATH_PROCNET_DEV "/proc/net/dev" #define PATH_PROCNET_ROUTE "/proc/net/route" -#define PISA_CONFDIR_PATH "/etc/pisa/" +#define PISA_CONFDIR_PATH "SYSCONFDIR/pisa/" #define PISA_RESOLVCONF_PATH "/etc/resolv.conf" -#define PISA_DIR_PERF_RESULTS "/etc/pisa/results" +#define PISA_DIR_PERF_RESULTS "SYSCONFDIR/pisa/results" #define PISACD_CONFFILE "pisacd.conf" #define PISACD_CONFFILE_FULLPATH PISA_CONFDIR_PATH PISACD_CONFFILE Modified: trunk/pisacd/Makefile.am ============================================================================== --- trunk/pisacd/Makefile.am Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/pisacd/Makefile.am Tue Oct 6 13:39:41 2009 (r1020) @@ -13,7 +13,6 @@ EXTRA_DIST = pisacd.conf sysconf_DATA = pisacd.conf -sysconfdir = /etc/pisa pisacddir = . Modified: trunk/pisand/Makefile.am ============================================================================== --- trunk/pisand/Makefile.am Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/pisand/Makefile.am Tue Oct 6 13:39:41 2009 (r1020) @@ -12,7 +12,6 @@ EXTRA_DIST = pisand.conf sysconf_DATA = pisand.conf -sysconfdir = /etc/pisa pisanddir = . Modified: trunk/pisasd/Makefile.am ============================================================================== --- trunk/pisasd/Makefile.am Tue Oct 6 12:32:33 2009 (r1019) +++ trunk/pisasd/Makefile.am Tue Oct 6 13:39:41 2009 (r1020) @@ -13,7 +13,6 @@ EXTRA_DIST = pisasd.conf authorized_hosts.conf users.conf sysconf_DATA = pisasd.conf authorized_hosts.conf users.conf -sysconfdir = /etc/pisa pisasddir = . pisaconfdir = .