[Box Backup-commit] COMMIT r2498 - in box/trunk: bin/bbackupd bin/bbstored contrib/debian lib/common lib/raidfile lib/server
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Fri Apr 10 00:05:29 BST 2009
Author: chris
Date: 2009-04-10 00:05:28 +0100 (Fri, 10 Apr 2009)
New Revision: 2498
Modified:
box/trunk/bin/bbackupd/bbackupd-config.in
box/trunk/bin/bbstored/bbstored-config.in
box/trunk/contrib/debian/bbackupd.in
box/trunk/contrib/debian/bbstored.in
box/trunk/lib/common/BoxPortsAndFiles.h.in
box/trunk/lib/raidfile/RaidFileController.h
box/trunk/lib/raidfile/raidfile-config.in
box/trunk/lib/server/Daemon.cpp
Log:
Change default location for config files from /etc/box to
/etc/boxbackup, thanks to Reinhard Tartler and the Debian Project.
Modified: box/trunk/bin/bbackupd/bbackupd-config.in
===================================================================
--- box/trunk/bin/bbackupd/bbackupd-config.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/bin/bbackupd/bbackupd-config.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -19,7 +19,7 @@
working-dir [backup directories]
Parameters:
- config-dir is usually @sysconfdir_expanded@/box
+ config-dir is usually @sysconfdir_expanded@/boxbackup
backup-mode is lazy or snapshot:
lazy mode runs continously, uploading files over a specified age
snapshot mode uploads a snapshot of the filesystem when instructed
@@ -57,7 +57,7 @@
}
# default locations
-my $default_config_location = '@sysconfdir_expanded@/box/bbackupd.conf';
+my $default_config_location = '@sysconfdir_expanded@/boxbackup/bbackupd.conf';
# command line parameters
my ($config_dir,$backup_mode,$account_num,$server,$working_dir, at tobackup) = @ARGV;
Modified: box/trunk/bin/bbstored/bbstored-config.in
===================================================================
--- box/trunk/bin/bbstored/bbstored-config.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/bin/bbstored/bbstored-config.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -19,7 +19,7 @@
bbstored-config config-dir server-hostname username [raidfile-config]
Parameters:
- config-dir is usually @sysconfdir_expanded@/box
+ config-dir is usually @sysconfdir_expanded@/boxbackup
server-hostname is the hostname that clients will use to connect to
this server
username is the user to run the server under
@@ -47,7 +47,7 @@
}
# default locations
-my $default_config_location = '@sysconfdir_expanded@/box/bbstored.conf';
+my $default_config_location = '@sysconfdir_expanded@/boxbackup/bbstored.conf';
# command line parameters
my ($config_dir,$server,$username,$raidfile_config) = @ARGV;
Modified: box/trunk/contrib/debian/bbackupd.in
===================================================================
--- box/trunk/contrib/debian/bbackupd.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/contrib/debian/bbackupd.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -7,7 +7,7 @@
NAME=bbackupd
LONGNAME="Box Backup Client daemon"
BINARY=@sbindir_expanded@/$NAME
-CONFIG=@sysconfdir_expanded@/box/$NAME.conf
+CONFIG=@sysconfdir_expanded@/boxbackup/$NAME.conf
PIDFILE=@localstatedir_expanded@/bbackupd/$NAME.pid
test -x $BINARY || exit 0
Modified: box/trunk/contrib/debian/bbstored.in
===================================================================
--- box/trunk/contrib/debian/bbstored.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/contrib/debian/bbstored.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -7,7 +7,7 @@
NAME=bbstored
LONGNAME="Box Backup Server daemon"
BINARY=@sbindir_expanded@/$NAME
-CONFIG=@sysconfdir_expanded@/box/$NAME.conf
+CONFIG=@sysconfdir_expanded@/boxbackup/$NAME.conf
PIDFILE=@localstatedir_expanded@/run/$NAME.pid
test -x $BINARY || exit 0
Modified: box/trunk/lib/common/BoxPortsAndFiles.h.in
===================================================================
--- box/trunk/lib/common/BoxPortsAndFiles.h.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/lib/common/BoxPortsAndFiles.h.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -31,9 +31,12 @@
#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"
+#define BOX_FILE_BBACKUPD_DEFAULT_CONFIG "@sysconfdir_expanded@/boxbackup/bbackupd.conf"
+#define BOX_FILE_RAIDFILE_DEFAULT_CONFIG "@sysconfdir_expanded@/boxbackup/raidfile.conf"
+#define BOX_FILE_BBSTORED_DEFAULT_CONFIG "@sysconfdir_expanded@/boxbackup/bbstored.conf"
+#define BOX_FILE_BBACKUPD_OLD_CONFIG "@sysconfdir_expanded@/box/bbackupd.conf"
+#define BOX_FILE_RAIDFILE_OLD_CONFIG "@sysconfdir_expanded@/box/raidfile.conf"
+#define BOX_FILE_BBSTORED_OLD_CONFIG "@sysconfdir_expanded@/box/bbstored.conf"
#endif
#endif // BOXPORTSANDFILES__H
Modified: box/trunk/lib/raidfile/RaidFileController.h
===================================================================
--- box/trunk/lib/raidfile/RaidFileController.h 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/lib/raidfile/RaidFileController.h 2009-04-09 23:05:28 UTC (rev 2498)
@@ -82,7 +82,7 @@
public:
void Initialise(const std::string& rConfigFilename =
- "/etc/box/raidfile.conf");
+ "/etc/boxbackup/raidfile.conf");
int GetNumDiscSets() {return mSetList.size();}
// --------------------------------------------------------------------------
Modified: box/trunk/lib/raidfile/raidfile-config.in
===================================================================
--- box/trunk/lib/raidfile/raidfile-config.in 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/lib/raidfile/raidfile-config.in 2009-04-09 23:05:28 UTC (rev 2498)
@@ -19,7 +19,7 @@
raidfile-config config-dir block-size dir0 [dir1 dir2]
Parameters:
- config-dir is usually @sysconfdir_expanded@/box
+ config-dir is usually @sysconfdir_expanded@/boxbackup
block-size must be a power of two, and usually the block or
fragment size of your file system
dir0, dir1, dir2 are the directories used as the root of the raid
Modified: box/trunk/lib/server/Daemon.cpp
===================================================================
--- box/trunk/lib/server/Daemon.cpp 2009-04-09 22:45:34 UTC (rev 2497)
+++ box/trunk/lib/server/Daemon.cpp 2009-04-09 23:05:28 UTC (rev 2498)
@@ -336,6 +336,7 @@
if (argc > optind && !mHaveConfigFile)
{
mConfigFileName = argv[optind]; optind++;
+ mHaveConfigFile = true;
}
if (argc > optind && ::strcmp(argv[optind], "SINGLEPROCESS") == 0)
@@ -375,6 +376,20 @@
try
{
+ if (!FileExists(rConfigFileName.c_str()))
+ {
+ BOX_FATAL("The main configuration file for " <<
+ DaemonName() << " was not found: " <<
+ rConfigFileName);
+ if (!mHaveConfigFile)
+ {
+ BOX_WARNING("The default configuration "
+ "directory has changed from /etc/box "
+ "to /etc/boxbackup");
+ }
+ return false;
+ }
+
apConfig = Configuration::LoadAndVerify(rConfigFileName,
GetConfigVerify(), errors);
}
More information about the Boxbackup-commit
mailing list