summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/bbackupctl/bbackupctl.cpp8
-rw-r--r--bin/bbackupd/bbackupd.cpp3
-rw-r--r--lib/common/BoxPortsAndFiles.h.in15
-rw-r--r--lib/server/Daemon.cpp5
-rw-r--r--lib/server/Daemon.h2
5 files changed, 16 insertions, 17 deletions
diff --git a/bin/bbackupctl/bbackupctl.cpp b/bin/bbackupctl/bbackupctl.cpp
index 8dc8f30e..39f15baf 100644
--- a/bin/bbackupctl/bbackupctl.cpp
+++ b/bin/bbackupctl/bbackupctl.cpp
@@ -67,13 +67,7 @@ int main(int argc, const char *argv[])
Logging::SetProgramName("bbackupctl");
// Filename for configuration file?
- std::string configFilename;
-
- #ifdef WIN32
- configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
- #else
- configFilename = BOX_FILE_BBACKUPD_DEFAULT_CONFIG;
- #endif
+ std::string configFilename = BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE;
// Quiet?
bool quiet = false;
diff --git a/bin/bbackupd/bbackupd.cpp b/bin/bbackupd/bbackupd.cpp
index d334a2df..8313e193 100644
--- a/bin/bbackupd/bbackupd.cpp
+++ b/bin/bbackupd/bbackupd.cpp
@@ -46,7 +46,8 @@ int main(int argc, const char *argv[])
#else // !WIN32
BackupDaemon daemon;
- ExitCode = daemon.Main(BOX_FILE_BBACKUPD_DEFAULT_CONFIG, argc, argv);
+ ExitCode = daemon.Main(BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE,
+ argc, argv);
#endif // WIN32
diff --git a/lib/common/BoxPortsAndFiles.h.in b/lib/common/BoxPortsAndFiles.h.in
index 41bad0ba..047a828f 100644
--- a/lib/common/BoxPortsAndFiles.h.in
+++ b/lib/common/BoxPortsAndFiles.h.in
@@ -32,12 +32,15 @@
#define BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE \
GetDefaultConfigFilePath("bbstored.conf").c_str()
#else
-#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"
+ #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"
+ #define BOX_GET_DEFAULT_BBACKUPD_CONFIG_FILE \
+ std::string("@sysconfdir_expanded@/boxbackup/bbackupd.conf")
+ #define BOX_GET_DEFAULT_RAIDFILE_CONFIG_FILE \
+ std::string("@sysconfdir_expanded@/boxbackup/raidfile.conf")
+ #define BOX_GET_DEFAULT_BBSTORED_CONFIG_FILE \
+ std::string("@sysconfdir_expanded@/boxbackup/bbstored.conf")
#endif
#endif // BOXPORTSANDFILES__H
diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp
index c4026395..abf4d7cb 100644
--- a/lib/server/Daemon.cpp
+++ b/lib/server/Daemon.cpp
@@ -291,10 +291,11 @@ int Daemon::ProcessOption(signed int option)
// Created: 2003/07/29
//
// --------------------------------------------------------------------------
-int Daemon::Main(const char *DefaultConfigFile, int argc, const char *argv[])
+int Daemon::Main(const std::string& rDefaultConfigFile, int argc,
+ const char *argv[])
{
// Find filename of config file
- mConfigFileName = DefaultConfigFile;
+ mConfigFileName = rDefaultConfigFile;
mAppName = argv[0];
#ifdef BOX_RELEASE_BUILD
diff --git a/lib/server/Daemon.h b/lib/server/Daemon.h
index a3212a00..82532366 100644
--- a/lib/server/Daemon.h
+++ b/lib/server/Daemon.h
@@ -40,7 +40,7 @@ private:
Daemon(const Daemon &rToCopy);
public:
- virtual int Main(const char *DefaultConfigFile, int argc,
+ virtual int Main(const std::string& rDefaultConfigFile, int argc,
const char *argv[]);
/* override this Main() if you want custom option processing: */