From e9364bfe94911bbb51fe566b25f3e41cdb2d92bc Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 7 Nov 2006 04:24:53 +0000 Subject: [PATCH] Set default configuration file directory on Unix to the configured value instead of /etc/bacula. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3602 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/autoconf/config.h.in | 3 +++ bacula/autoconf/configure.in | 3 ++- bacula/configure | 6 +++++- bacula/src/lib/parse_conf.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in index 1ebb5a81d4..efc3e757e7 100644 --- a/bacula/autoconf/config.h.in +++ b/bacula/autoconf/config.h.in @@ -149,6 +149,9 @@ /* LOCALEDIR */ #undef LOCALEDIR +/* Set to value of --sysconfdir option */ +#undef SYSCONFDIR + /* Define if you have zlib */ #undef HAVE_LIBZ diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index aa3c4b4a32..e4f6eba188 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -146,6 +146,7 @@ sysconfdir=`eval echo ${sysconfdir}` datadir=`eval echo ${datadir}` localedir=`eval echo ${datadir}/locale` AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir") +AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir") # ------------------------------------------------------------------------- # If the user has not set --exec-prefix, we default to ${prefix} @@ -301,7 +302,7 @@ if test x$support_tray_monitor = xyes; then abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0` pkg=$? if test $pkg = 0; then - AC_DEFINE(HAVE_GTK_2_4) + AC_DEFINE(HAVE_GTK_2_4) fi fi fi diff --git a/bacula/configure b/bacula/configure index 303519c3e4..4bebc8dfc3 100755 --- a/bacula/configure +++ b/bacula/configure @@ -6736,6 +6736,10 @@ cat >>confdefs.h <<_ACEOF #define LOCALEDIR "$localedir" _ACEOF +cat >>confdefs.h <<_ACEOF +#define SYSCONFDIR "$sysconfdir" +_ACEOF + # ------------------------------------------------------------------------- # If the user has not set --exec-prefix, we default to ${prefix} @@ -12883,7 +12887,7 @@ if test x$support_tray_monitor = xyes; then abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0` pkg=$? if test $pkg = 0; then - cat >>confdefs.h <<\_ACEOF + cat >>confdefs.h <<\_ACEOF #define HAVE_GTK_2_4 1 _ACEOF diff --git a/bacula/src/lib/parse_conf.c b/bacula/src/lib/parse_conf.c index b3f6804312..48c5a58cea 100755 --- a/bacula/src/lib/parse_conf.c +++ b/bacula/src/lib/parse_conf.c @@ -930,7 +930,7 @@ const char *get_default_configdir() } return szConfigDir; #else - return "/etc/bacula"; + return SYSCONFDIR; #endif } -- 2.39.5