|
@@ -503,7 +503,7 @@ void doBackup(const string& vault,
|
|
|
# 248 "kind.ag"
|
|
|
string userAtHost = conf.getString("user") + "@" +
|
|
|
# 249 "kind.ag"
|
|
|
- conf.getString("host");
|
|
|
+ conf.getString("host");
|
|
|
# 250 "kind.ag"
|
|
|
string rshCommand = remoteShell;
|
|
|
# 251 "kind.ag"
|
|
@@ -663,9 +663,9 @@ void doBackup(const string& vault,
|
|
|
# 328 "kind.ag"
|
|
|
if (rc == 0 ||
|
|
|
# 329 "kind.ag"
|
|
|
- rc == 24 || // "no error" or "vanished source files" (ignored)
|
|
|
+ rc == 24 || // "no error" or "vanished source files" (ignored)
|
|
|
# 330 "kind.ag"
|
|
|
- rc == 6144) // workaround for wrong exit code ??!!
|
|
|
+ rc == 6144) // workaround for wrong exit code ??!!
|
|
|
# 331 "kind.ag"
|
|
|
{
|
|
|
# 332 "kind.ag"
|
|
@@ -789,7 +789,7 @@ void backupVault(const string& vault,
|
|
|
# 391 "kind.ag"
|
|
|
|
|
|
# 392 "kind.ag"
|
|
|
- if (conf.hasKey("setRules"))
|
|
|
+ if (conf.hasKey("setRule"))
|
|
|
# 393 "kind.ag"
|
|
|
{
|
|
|
# 394 "kind.ag"
|
|
@@ -1035,7 +1035,7 @@ void expireVault(const string& vault, KindConfig conf, DateTime now)
|
|
|
# 514 "kind.ag"
|
|
|
if (imageTime != now && // ignore just created image
|
|
|
# 515 "kind.ag"
|
|
|
- image.name != lastValidImage // ignore last valid image
|
|
|
+ image.name != lastValidImage // ignore last valid image
|
|
|
# 516 "kind.ag"
|
|
|
)
|
|
|
# 517 "kind.ag"
|
|
@@ -1159,15 +1159,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);
|
|
@@ -1176,9 +1176,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);
|
|
@@ -1187,15 +1187,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 doBackup = false;
|
|
|
- bool doExpire = false;
|
|
|
- bool listConfig = false;
|
|
|
+bool fullImage = false;
|
|
|
+string masterConfig = "";
|
|
|
+bool doBackup = false;
|
|
|
+bool doExpire = false;
|
|
|
+bool listConfig = false;
|
|
|
|
|
|
- string vault = "";
|
|
|
+string vault = "";
|
|
|
static struct option ag_long_options[] =
|
|
|
{
|
|
|
{"full", no_argument, 0, 'f' },
|
|
@@ -1224,44 +1224,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':
|
|
|
- doBackup = true;
|
|
|
- break;
|
|
|
+ doBackup = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'E':
|
|
|
- doExpire = true;
|
|
|
- break;
|
|
|
+ doExpire = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'C':
|
|
|
- listConfig = true;
|
|
|
- break;
|
|
|
+ listConfig = true;
|
|
|
+ break;
|
|
|
|
|
|
case 'D':
|
|
|
- dryRun = true;
|
|
|
- break;
|
|
|
+ dryRun = 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");
|
|
@@ -1271,7 +1271,7 @@ int main(int argc, char** argv)
|
|
|
vault = argv[optind++];
|
|
|
else error("Parameter vault_or_group needed");
|
|
|
|
|
|
- /*AppGen:MainEnd*/
|
|
|
+/*AppGen:MainEnd*/
|
|
|
# 567 "kind.ag"
|
|
|
|
|
|
# 568 "kind.ag"
|