|
|
@@ -281,9 +281,9 @@ bool isValidImage(const string& imageName)
|
|
|
# 137 "kind.ag"
|
|
|
return dirExists(imageName) &&
|
|
|
# 138 "kind.ag"
|
|
|
- !fileExists(imageName + "/error") &&
|
|
|
+ !fileExists(imageName + "/error") &&
|
|
|
# 139 "kind.ag"
|
|
|
- dirExists(imageName + "/tree");
|
|
|
+ dirExists(imageName + "/tree");
|
|
|
# 140 "kind.ag"
|
|
|
}
|
|
|
# 141 "kind.ag"
|
|
|
@@ -501,7 +501,7 @@ void backupVault(const string& vault,
|
|
|
# 247 "kind.ag"
|
|
|
string userAtHost = conf.getString("user") + "@" +
|
|
|
# 248 "kind.ag"
|
|
|
- conf.getString("host");
|
|
|
+ conf.getString("host");
|
|
|
# 249 "kind.ag"
|
|
|
string rshCommand = remoteShell;
|
|
|
# 250 "kind.ag"
|
|
|
@@ -689,9 +689,9 @@ void backupVault(const string& vault,
|
|
|
# 341 "kind.ag"
|
|
|
if (rc == 0 ||
|
|
|
# 342 "kind.ag"
|
|
|
- rc == 24 || // "no error" or "vanished source files" (ignored)
|
|
|
+ rc == 24 || // "no error" or "vanished source files" (ignored)
|
|
|
# 343 "kind.ag"
|
|
|
- rc == 6114) // workaround for wrong exit code ??!!
|
|
|
+ rc == 6114) // workaround for wrong exit code ??!!
|
|
|
# 344 "kind.ag"
|
|
|
{
|
|
|
# 345 "kind.ag"
|
|
|
@@ -1095,9 +1095,9 @@ void expireVault(const string& vault, KindConfig conf, DateTime now)
|
|
|
# 544 "kind.ag"
|
|
|
for (unsigned int i = 0;
|
|
|
# 545 "kind.ag"
|
|
|
- i < validImages.size() - 1; // never expire latest image
|
|
|
+ i < validImages.size() - 1; // never expire latest image
|
|
|
# 546 "kind.ag"
|
|
|
- ++i)
|
|
|
+ ++i)
|
|
|
# 547 "kind.ag"
|
|
|
{
|
|
|
# 548 "kind.ag"
|
|
|
@@ -1159,10 +1159,10 @@ string ag_programName;
|
|
|
void usage()
|
|
|
{
|
|
|
cout << ag_programName << " - archiving backup" << endl;
|
|
|
- cout << "Usage:" << endl;
|
|
|
+ cout << "Aufruf:" << endl;
|
|
|
cout << ag_programName << " [<options>] vault_or_group " << endl;
|
|
|
cout << " vault_or_group - Vault to backup" << endl;
|
|
|
- cout << "Options:" << endl;
|
|
|
+ cout << "Optionen:" << endl;
|
|
|
cout << " -f --full Force full image == initial backup (default: false)" << endl;
|
|
|
cout << " -c --masterconfig Master config file (default: \"\")" << endl;
|
|
|
cout << " if not given or empty kind looks for" << endl;
|
|
|
@@ -1179,15 +1179,15 @@ void usage()
|
|
|
exit(1);
|
|
|
}
|
|
|
|
|
|
-void error(const string& msg)
|
|
|
+void error(const string &msg)
|
|
|
{
|
|
|
cout << endl << ag_programName << " - error: " << msg << endl << endl;
|
|
|
usage();
|
|
|
}
|
|
|
|
|
|
-int ptoi(const char* para)
|
|
|
+int ptoi(const char *para)
|
|
|
{
|
|
|
- char* end;
|
|
|
+ char *end;
|
|
|
int res = strtol(para, &end, 10);
|
|
|
if (end == para)
|
|
|
error(string("no int: ") + para);
|
|
|
@@ -1196,9 +1196,9 @@ int ptoi(const char* para)
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-double ptod(const char* para)
|
|
|
+double ptod(const char *para)
|
|
|
{
|
|
|
- char* end;
|
|
|
+ char *end;
|
|
|
double res = strtod(para, &end);
|
|
|
if (end == para)
|
|
|
error(string("no double: ") + para);
|
|
|
@@ -1207,15 +1207,15 @@ double ptod(const char* para)
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-int main(int argc, char** argv)
|
|
|
+int main(int argc, char **argv)
|
|
|
{
|
|
|
- bool fullImage = false;
|
|
|
- string masterConfig = "";
|
|
|
- bool backupOnly = false;
|
|
|
- bool expireOnly = false;
|
|
|
- bool listConfig = false;
|
|
|
+bool fullImage = false;
|
|
|
+string masterConfig = "";
|
|
|
+bool backupOnly = false;
|
|
|
+bool expireOnly = false;
|
|
|
+bool listConfig = false;
|
|
|
|
|
|
- string vault = "";
|
|
|
+string vault = "";
|
|
|
static struct option ag_long_options[] =
|
|
|
{
|
|
|
{"full", no_argument, 0, 'f' },
|
|
|
@@ -1244,44 +1244,44 @@ int main(int argc, char** argv)
|
|
|
error("Expecting option parameter");
|
|
|
break;
|
|
|
case 'f':
|
|
|
- fullImage = true;
|
|
|
- break;
|
|
|
+ fullImage = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'c':
|
|
|
- masterConfig = optarg;
|
|
|
- break;
|
|
|
+ masterConfig = optarg;
|
|
|
+ break;
|
|
|
|
|
|
case 'B':
|
|
|
- backupOnly = true;
|
|
|
- break;
|
|
|
+ backupOnly = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'E':
|
|
|
- expireOnly = true;
|
|
|
- break;
|
|
|
+ expireOnly = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'D':
|
|
|
- dryRun = true;
|
|
|
- break;
|
|
|
+ dryRun = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'C':
|
|
|
- listConfig = true;
|
|
|
- break;
|
|
|
+ listConfig = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'v':
|
|
|
- verbose = true;
|
|
|
- break;
|
|
|
+ verbose = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'd':
|
|
|
- debug = true;
|
|
|
- break;
|
|
|
+ debug = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'q':
|
|
|
- quiet = true;
|
|
|
- break;
|
|
|
+ quiet = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'h':
|
|
|
- usage();
|
|
|
- break;
|
|
|
+ usage();
|
|
|
+ break;
|
|
|
|
|
|
default:
|
|
|
error("error in options");
|
|
|
@@ -1291,7 +1291,7 @@ int main(int argc, char** argv)
|
|
|
vault = argv[optind++];
|
|
|
else error("Parameter vault_or_group needed");
|
|
|
|
|
|
- /*AppGen:MainEnd*/
|
|
|
+/*AppGen:MainEnd*/
|
|
|
# 578 "kind.ag"
|
|
|
|
|
|
# 579 "kind.ag"
|