summaryrefslogtreecommitdiffabout
Unidiff
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
@@ -61,6 +61,12 @@ BEGIN
61 config_file = optarg; 61 config_file = optarg;
62END 62END
63 63
64OPTION(pidfile,p,FILE,
65 [<write PID to FILE>])
66BEGIN
67 cli_pidfile = optarg;
68END
69
64OPTION(cron,,, 70OPTION(cron,,,
65 [<run as a periodic cron job (default)>]) 71 [<run as a periodic cron job (default)>])
66 BEGIN 72 BEGIN
diff --git a/src/config.c b/src/config.c
index 5ff9280..6ddb2ea 100644
--- a/src/config.c
+++ b/src/config.c
@@ -388,7 +388,6 @@ synclist_fixup()
388void 388void
389config_parse() 389config_parse()
390{ 390{
391 int err = 0;
392 struct grecs_node *tree = grecs_parse(config_file); 391 struct grecs_node *tree = grecs_parse(config_file);
393 if (!tree) 392 if (!tree)
394 exit(EX_CONFIG); 393 exit(EX_CONFIG);
@@ -399,19 +398,17 @@ config_parse()
399 398
400 if (!synclist) { 399 if (!synclist) {
401 error("nothing to do!"); 400 error("nothing to do!");
402 err = 1; 401 exit(EX_CONFIG);
403 } 402 }
404 403
405 if (synclist_fixup()) 404 if (synclist_fixup())
406 err = 1; 405 exit(EX_CONFIG);
407 406
408 if (sql_host_fixup()) 407 if (sql_host_fixup())
409 err = 1; 408 exit(EX_CONFIG);
410 409
411 source_named_conf(); 410 source_named_conf();
412 411
413 if (err)
414 exit(EX_CONFIG);
415 if (lint_mode) 412 if (lint_mode)
416 exit(0); 413 exit(0);
417 if (!tempdir) { 414 if (!tempdir) {
diff --git a/src/nssync.c b/src/nssync.c
index d10ce05..8f4fad2 100644
--- a/src/nssync.c
+++ b/src/nssync.c
@@ -30,6 +30,7 @@ int debug_level;
30char *config_file = SYSCONFDIR "/nssync.conf"; 30char *config_file = SYSCONFDIR "/nssync.conf";
31char *slave_status_file; 31char *slave_status_file;
32char *pidfile; 32char *pidfile;
33char *cli_pidfile;
33int force; 34int force;
34char *tempdir; 35char *tempdir;
35char *reload_command = "/usr/sbin/rndc reload"; 36char *reload_command = "/usr/sbin/rndc reload";
@@ -702,6 +703,9 @@ main(int argc, char **argv)
702 EX_CONFIG : 0); 703 EX_CONFIG : 0);
703 config_parse(); 704 config_parse();
704 705
706 if (cli_pidfile)
707 pidfile = cli_pidfile;
708
705 check_pidfile(); 709 check_pidfile();
706 710
707 if (check_ns) 711 if (check_ns)

Return to:

Send suggestions and report system problems to the System administrator.