From 6b82a93f2dc7f303103540babb74a75e41b84008 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 22 Mar 2007 16:22:07 +1100 Subject: [PATCH] Fix errors in statd calling sm-notify. The option for set-source-address is '-v', not '-N'. And only warn about -N if -N was actually used. --- utils/statd/statd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/statd/statd.c b/utils/statd/statd.c index 157de85..22d5deb 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -230,12 +230,10 @@ static void run_sm_notify(int outport) av[ac++] = op; } if (run_mode & STATIC_HOSTNAME) { - av[ac++] = "-N"; + av[ac++] = "-v"; av[ac++] = MY_NAME; } av[ac] = NULL; - fprintf(stderr, "%s: -N deprecated, consider using /usr/sbin/sm-notify directly\n", - name_p); execv(av[0], av); fprintf(stderr, "%s: failed to run %s\n", name_p, av[0]); exit(2); @@ -369,8 +367,11 @@ int main (int argc, char **argv) exit(-1); } - if (run_mode & MODE_NOTIFY_ONLY) + if (run_mode & MODE_NOTIFY_ONLY) { + fprintf(stderr, "%s: -N deprecated, consider using /usr/sbin/sm-notify directly\n", + name_p); run_sm_notify(out_port); + } if (!(run_mode & MODE_NODAEMON)) { -- 2.39.5