From: Florent Bruneau Date: Mon, 10 Nov 2008 10:47:04 +0000 (+0100) Subject: Silent check-conf in case of success. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=1d1c3b7455cc547dc7415edbaf9fd6c2fd0fb2cc;p=apps%2Fpfixtools.git Silent check-conf in case of success. Signed-off-by: Florent Bruneau --- diff --git a/ChangeLog b/ChangeLog index a0849d9..2b4f5c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ * common: FIX: fix build of the trie from an unsorted string list FRU + * postlicyd: + NEW: 'check-configuration' option FRU + ------------------------------------------------------------------------------ version 0.4 Oct 17, 2008 diff --git a/example/postlicyd.initd.sh b/example/postlicyd.initd.sh index b07ecd9..d1e6510 100755 --- a/example/postlicyd.initd.sh +++ b/example/postlicyd.initd.sh @@ -14,7 +14,7 @@ CONF=/etc/pfixtools/postlicyd.conf mkdir -p `dirname "$PIDFILE"` || die "Can't create $PIDFILE" do_checkconf() { - $POSTLICYD -c "$CONF" &> /dev/null + $POSTLICYD -c "$CONF" return "$?" } diff --git a/postlicyd/main-postlicyd.c b/postlicyd/main-postlicyd.c index 87920be..c60d515 100644 --- a/postlicyd/main-postlicyd.c +++ b/postlicyd/main-postlicyd.c @@ -336,10 +336,10 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - info("%s v%s...", DAEMON_NAME, DAEMON_VERSION); if (check_conf) { return config_check(argv[optind]) ? EXIT_SUCCESS : EXIT_FAILURE; } + info("%s v%s...", DAEMON_NAME, DAEMON_VERSION); if (pidfile_open(pidfile) < 0) { crit("unable to write pidfile %s", pidfile);