[Box Backup-commit] COMMIT r2061 - in box/trunk: . lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Mon Jan 28 23:53:27 GMT 2008
Author: chris
Date: 2008-01-28 23:53:26 +0000 (Mon, 28 Jan 2008)
New Revision: 2061
Added:
box/trunk/lib/common/BoxPortsAndFiles.h.in
Removed:
box/trunk/lib/common/BoxPortsAndFiles.h
Modified:
box/trunk/configure.ac
Log:
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).
Modified: box/trunk/configure.ac
===================================================================
--- box/trunk/configure.ac 2008-01-28 22:08:43 UTC (rev 2060)
+++ box/trunk/configure.ac 2008-01-28 23:53:26 UTC (rev 2061)
@@ -6,6 +6,9 @@
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_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 @@
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
Deleted: box/trunk/lib/common/BoxPortsAndFiles.h
===================================================================
--- box/trunk/lib/common/BoxPortsAndFiles.h 2008-01-28 22:08:43 UTC (rev 2060)
+++ box/trunk/lib/common/BoxPortsAndFiles.h 2008-01-28 23:53:26 UTC (rev 2061)
@@ -1,40 +0,0 @@
-// --------------------------------------------------------------------------
-//
-// File
-// Name: BoxPortsAndFiles.h
-// Purpose: Central list of which tcp/ip ports and hardcoded file locations
-// Created: 2003/08/20
-//
-// --------------------------------------------------------------------------
-
-#ifndef BOXPORTSANDFILES__H
-#define BOXPORTSANDFILES__H
-
-#define BOX_PORT_BASE 2200
-
-
-// Backup store daemon
-#define BOX_PORT_BBSTORED (BOX_PORT_BASE+1)
-
-// directory within the RAIDFILE root for the backup store daemon
-#define BOX_RAIDFILE_ROOT_BBSTORED "backup"
-
-// configuration file paths
-#ifdef WIN32
- // no default config file path, use these macros to call
- // GetDefaultConfigFilePath() instead.
-
- #define BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE \
- GetDefaultConfigFilePath("bbackupd.conf").c_str()
- #define BOX_GET_DEFAULT_RAIDFILE_CONFIG_FILE \
- GetDefaultConfigFilePath("raidfile.conf").c_str()
- #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"
-#endif
-
-#endif // BOXPORTSANDFILES__H
-
Copied: box/trunk/lib/common/BoxPortsAndFiles.h.in (from rev 2059, box/trunk/lib/common/BoxPortsAndFiles.h)
===================================================================
--- box/trunk/lib/common/BoxPortsAndFiles.h.in (rev 0)
+++ box/trunk/lib/common/BoxPortsAndFiles.h.in 2008-01-28 23:53:26 UTC (rev 2061)
@@ -0,0 +1,40 @@
+// --------------------------------------------------------------------------
+//
+// File
+// Name: BoxPortsAndFiles.h
+// Purpose: Central list of which tcp/ip ports and hardcoded file locations
+// Created: 2003/08/20
+//
+// --------------------------------------------------------------------------
+
+#ifndef BOXPORTSANDFILES__H
+#define BOXPORTSANDFILES__H
+
+#define BOX_PORT_BASE 2200
+
+
+// Backup store daemon
+#define BOX_PORT_BBSTORED (BOX_PORT_BASE+1)
+
+// directory within the RAIDFILE root for the backup store daemon
+#define BOX_RAIDFILE_ROOT_BBSTORED "backup"
+
+// configuration file paths
+#ifdef WIN32
+ // no default config file path, use these macros to call
+ // GetDefaultConfigFilePath() instead.
+
+ #define BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE \
+ GetDefaultConfigFilePath("bbackupd.conf").c_str()
+ #define BOX_GET_DEFAULT_RAIDFILE_CONFIG_FILE \
+ GetDefaultConfigFilePath("raidfile.conf").c_str()
+ #define BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE \
+ GetDefaultConfigFilePath("bbstored.conf").c_str()
+#else
+#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
+
More information about the Boxbackup-commit
mailing list