diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-01-28 23:53:26 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-01-28 23:53:26 +0000 |
commit | 1afeacadd7303cd89ddc319fae1e20a8f82f9bb1 (patch) | |
tree | 151660f54597c591756b983a865d8853115f6472 | |
parent | a82dee651cd06a60e3a5108994d0168a19aa96b6 (diff) |
Change the default sysconfdir to /etc.
Generate expanded versions of sysconfdir and localstatedir, as well as
bindir.
Expand variables in BoxPortsAndFiles.h.in.
Changed default configuration dir in BoxPortsAndFiles.h.in to use
@sysconfdir_expanded@/box, defaulting to /etc/box as before. But now
you can override it with something like --sysconfdir=/usr/etc
(to place config files in /usr/etc/box).
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | lib/common/BoxPortsAndFiles.h.in (renamed from lib/common/BoxPortsAndFiles.h) | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 8d37cea0..4e50cfc0 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,9 @@ AC_INIT([Box Backup], 0.11, [boxbackup@fluffy.co.uk]) AC_CONFIG_SRCDIR([lib/common/Box.h]) AC_CONFIG_HEADERS([lib/common/BoxConfig.h]) +# override default sysconfdir, for backwards compatibility +AC_SUBST([sysconfdir], ['/etc'])dnl + touch install-sh AC_CANONICAL_SYSTEM test -s install-sh || rm install-sh @@ -273,11 +276,13 @@ saved_prefix=$prefix saved_exec_prefix=$exec_prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -bindir_expanded=`eval "echo $bindir"` -bindir_expanded=`eval "echo $bindir_expanded"` +bindir_expanded=` eval "echo $bindir"` +bindir_expanded=` eval "echo $bindir_expanded"` +sysconfdir_expanded=` eval "echo $sysconfdir"` +localstatedir_expanded=`eval "echo $localstatedir"` prefix=$saved_prefix exec_prefix=$saved_exec_prefix -AC_SUBST([bindir_expanded]) +AC_SUBST([bindir_expanded sysconfdir_expanded localstatedir_expanded]) ### Output files @@ -293,6 +298,7 @@ AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config infrastructure/makebuildenv.pl infrastructure/makeparcels.pl infrastructure/makedistribution.pl + lib/common/BoxPortsAndFiles.h lib/common/makeexception.pl lib/raidfile/raidfile-config lib/server/makeprotocol.pl diff --git a/lib/common/BoxPortsAndFiles.h b/lib/common/BoxPortsAndFiles.h.in index d9abeafc..fcc0ddce 100644 --- a/lib/common/BoxPortsAndFiles.h +++ b/lib/common/BoxPortsAndFiles.h.in @@ -31,9 +31,9 @@ #define BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE \ GetDefaultConfigFilePath("bbstored.conf").c_str() #else -#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "/etc/box/bbackupd.conf" -#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "/etc/box/raidfile.conf" -#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "/etc/box/bbstored.conf" +#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "@sysconfdir_expanded@/box/bbackupd.conf" +#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "@sysconfdir_expanded@/box/raidfile.conf" +#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "@sysconfdir_expanded@/box/bbstored.conf" #endif #endif // BOXPORTSANDFILES__H |