summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
m---------grecs0
-rw-r--r--src/cmdline.opt6
-rw-r--r--src/config.c9
-rw-r--r--src/nssync.c4
4 files changed, 13 insertions, 6 deletions
diff --git a/grecs b/grecs
-Subproject 6020d6243c7fdf657da768b3fb2efa1244665d5
+Subproject 3299cf1ccb1c596969fcfd91253e10d5482eacf
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 221133e..23c6bcb 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -63,2 +63,8 @@ END
+OPTION(pidfile,p,FILE,
+ [<write PID to FILE>])
+BEGIN
+ cli_pidfile = optarg;
+END
+
OPTION(cron,,,
diff --git a/src/config.c b/src/config.c
index 5ff9280..6ddb2ea 100644
--- a/src/config.c
+++ b/src/config.c
@@ -390,3 +390,2 @@ config_parse()
{
- int err = 0;
struct grecs_node *tree = grecs_parse(config_file);
@@ -401,3 +400,3 @@ config_parse()
error("nothing to do!");
- err = 1;
+ exit(EX_CONFIG);
}
@@ -405,6 +404,6 @@ config_parse()
if (synclist_fixup())
- err = 1;
+ exit(EX_CONFIG);
if (sql_host_fixup())
- err = 1;
+ exit(EX_CONFIG);
@@ -412,4 +411,2 @@ config_parse()
- if (err)
- exit(EX_CONFIG);
if (lint_mode)
diff --git a/src/nssync.c b/src/nssync.c
index d10ce05..8f4fad2 100644
--- a/src/nssync.c
+++ b/src/nssync.c
@@ -32,2 +32,3 @@ char *slave_status_file;
char *pidfile;
+char *cli_pidfile;
int force;
@@ -704,2 +705,5 @@ main(int argc, char **argv)
+ if (cli_pidfile)
+ pidfile = cli_pidfile;
+
check_pidfile();

Return to:

Send suggestions and report system problems to the System administrator.