]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
sm-notify: Disable syslog messages when debugging is enabled
authorChuck Lever <chuck.lever@oracle.com>
Mon, 29 Aug 2011 17:13:15 +0000 (13:13 -0400)
committerLuk Claes <luk@debian.org>
Sun, 2 Oct 2011 14:16:47 +0000 (16:16 +0200)
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 <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/statd/sm-notify.c

index 1f490b0e6b7832baadf963f10c5839c846f4e1e9..f05eadf5d5b43e2be52525ac5c515a4253c80fcd 100644 (file)
@@ -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");