diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:29 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:29 +0000 |
commit | 3661f3624acc46590d5504fda4f8714255fb2c8e (patch) | |
tree | e2cd17e19718d3f46944979a23e4c93dcf92584b /lib/backupclient/BackupDaemonConfigVerify.cpp | |
parent | 2f8d0c29536cdb306b525b78638727da4ead0022 (diff) |
Tailorization
Import of the upstream sources from
Repository: http://localhost:8000/
Kind: hg
Revision: 7807b7768163f1c2537756abe5416063989cebb1
Original author: tailor@rocio.int.aidworld.org
Date: 2008-03-16 19:44:36+00:00
Diffstat (limited to 'lib/backupclient/BackupDaemonConfigVerify.cpp')
-rw-r--r-- | lib/backupclient/BackupDaemonConfigVerify.cpp | 89 |
1 files changed, 37 insertions, 52 deletions
diff --git a/lib/backupclient/BackupDaemonConfigVerify.cpp b/lib/backupclient/BackupDaemonConfigVerify.cpp index db1de4fa..61033b5b 100644 --- a/lib/backupclient/BackupDaemonConfigVerify.cpp +++ b/lib/backupclient/BackupDaemonConfigVerify.cpp @@ -17,15 +17,15 @@ static const ConfigurationVerifyKey backuplocationkeys[] = { - ConfigurationVerifyKey("ExcludeFile", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("ExcludeFilesRegex", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("ExcludeDir", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("ExcludeDirsRegex", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("AlwaysIncludeFile", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("AlwaysIncludeFilesRegex", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("AlwaysIncludeDir", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("AlwaysIncludeDirsRegex", ConfigTest_MultiValueAllowed), - ConfigurationVerifyKey("Path", ConfigTest_Exists | ConfigTest_LastEntry) + {"ExcludeFile", 0, ConfigTest_MultiValueAllowed, 0}, + {"ExcludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, + {"ExcludeDir", 0, ConfigTest_MultiValueAllowed, 0}, + {"ExcludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, + {"AlwaysIncludeFile", 0, ConfigTest_MultiValueAllowed, 0}, + {"AlwaysIncludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, + {"AlwaysIncludeDir", 0, ConfigTest_MultiValueAllowed, 0}, + {"AlwaysIncludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, + {"Path", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} }; static const ConfigurationVerify backuplocations[] = @@ -64,54 +64,39 @@ static const ConfigurationVerify verifyserver[] = static const ConfigurationVerifyKey verifyrootkeys[] = { - ConfigurationVerifyKey("AccountNumber", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("UpdateStoreInterval", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("MinimumFileAge", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("MaxUploadWait", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("MaxFileTimeInFuture", ConfigTest_IsInt, 172800), - // file is uploaded if the file is this much in the future - // (2 days default) - ConfigurationVerifyKey("AutomaticBackup", ConfigTest_IsBool, true), + {"AccountNumber", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + + {"UpdateStoreInterval", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + {"MinimumFileAge", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + {"MaxUploadWait", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + {"MaxFileTimeInFuture", "172800", ConfigTest_IsInt, 0}, // file is uploaded if the file is this much in the future (2 days default) + + {"AutomaticBackup", "yes", ConfigTest_IsBool, 0}, - ConfigurationVerifyKey("SyncAllowScript", 0), - // script that returns "now" if backup is allowed now, or a number - // of seconds to wait before trying again if not + {"SyncAllowScript", 0, 0, 0}, // optional script to run to see if the sync should be started now + // return "now" if it's allowed, or a number of seconds if it's not + + {"MaximumDiffingTime", 0, ConfigTest_IsInt, 0}, + {"DeleteRedundantLocationsAfter", "172800", ConfigTest_IsInt, 0}, - ConfigurationVerifyKey("MaximumDiffingTime", ConfigTest_IsInt), - ConfigurationVerifyKey("DeleteRedundantLocationsAfter", - ConfigTest_IsInt, 172800), + {"FileTrackingSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + {"DiffingUploadSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, + {"StoreHostname", 0, ConfigTest_Exists, 0}, + {"ExtendedLogging", "no", ConfigTest_IsBool, 0}, // extended log to syslog + {"ExtendedLogFile", NULL, 0, 0}, // extended log to a file + {"LogAllFileAccess", "no", ConfigTest_IsBool, 0}, - ConfigurationVerifyKey("FileTrackingSizeThreshold", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("DiffingUploadSizeThreshold", - ConfigTest_Exists | ConfigTest_IsInt), - ConfigurationVerifyKey("StoreHostname", ConfigTest_Exists), - ConfigurationVerifyKey("StorePort", ConfigTest_IsInt, - BOX_PORT_BBSTORED), - ConfigurationVerifyKey("ExtendedLogging", ConfigTest_IsBool, false), - // extended log to syslog - ConfigurationVerifyKey("ExtendedLogFile", 0), - // extended log to a file - ConfigurationVerifyKey("LogAllFileAccess", ConfigTest_IsBool, false), - ConfigurationVerifyKey("CommandSocket", 0), - // not compulsory to have this - ConfigurationVerifyKey("KeepAliveTime", ConfigTest_IsInt), - ConfigurationVerifyKey("StoreObjectInfoFile", 0), - // optional + {"CommandSocket", 0, 0, 0}, // not compulsory to have this + {"KeepAliveTime", 0, ConfigTest_IsInt, 0}, // optional + {"StoreObjectInfoFile", 0, 0, 0}, // optional - ConfigurationVerifyKey("NotifyScript", 0), - // optional script to run when backup needs attention, eg store full + {"NotifyScript", 0, 0, 0}, // optional script to run when backup needs attention, eg store full - ConfigurationVerifyKey("CertificateFile", ConfigTest_Exists), - ConfigurationVerifyKey("PrivateKeyFile", ConfigTest_Exists), - ConfigurationVerifyKey("TrustedCAsFile", ConfigTest_Exists), - ConfigurationVerifyKey("KeysFile", ConfigTest_Exists), - ConfigurationVerifyKey("DataDirectory", - ConfigTest_Exists | ConfigTest_LastEntry), + {"CertificateFile", 0, ConfigTest_Exists, 0}, + {"PrivateKeyFile", 0, ConfigTest_Exists, 0}, + {"TrustedCAsFile", 0, ConfigTest_Exists, 0}, + {"KeysFile", 0, ConfigTest_Exists, 0}, + {"DataDirectory", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} }; const ConfigurationVerify BackupDaemonConfigVerify = |