From: Chuck Lever Date: Mon, 29 Aug 2011 17:13:15 +0000 (-0400) Subject: sm-notify: Disable syslog messages when debugging is enabled X-Git-Tag: debian/1%1.2.5-1~11^2~25 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=8c2ab7116ee81619d4c24d5b97a36635a046b650;p=nfs-utils.git sm-notify: Disable syslog messages when debugging is enabled statd's "-F" flag disables syslog output, and specifies sm-notify's "-d" option when it runs it. sm-notify's "-d" option should therefore also disable syslog output. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson --- diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c index 1f490b0..f05eadf 100644 --- a/utils/statd/sm-notify.c +++ b/utils/statd/sm-notify.c @@ -395,12 +395,14 @@ usage: fprintf(stderr, exit(1); } - xlog_syslog(1); if (opt_debug) { + xlog_syslog(0); xlog_stderr(1); xlog_config(D_ALL, 1); - } else + } else { + xlog_syslog(1); xlog_stderr(0); + } xlog_open(progname); xlog(L_NOTICE, "Version " VERSION " starting");