From: Neil Brown Date: Thu, 22 Mar 2007 05:22:07 +0000 (+1100) Subject: Fix errors in statd calling sm-notify. X-Git-Tag: nfs-utils-1-1-0-rc1~19 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=6b82a93f2dc7f303103540babb74a75e41b84008;p=nfs-utils.git 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. --- 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)) {