Use "set -e" command instead of "#! /bin/sh -e" magic.
[sliver-openvswitch.git] / utilities / ofp-discover.c
index 4efaac7..461aa7c 100644 (file)
@@ -42,6 +42,7 @@
 #include "daemon.h"
 #include "dhcp-client.h"
 #include "dhcp.h"
+#include "dirs.h"
 #include "dynamic-string.h"
 #include "fatal-signal.h"
 #include "netdev.h"
@@ -364,7 +365,8 @@ parse_options(int argc, char *argv[])
             usage();
 
         case 'V':
-            printf("%s "VERSION" compiled "__DATE__" "__TIME__"\n", argv[0]);
+            printf("%s %s compiled "__DATE__" "__TIME__"\n",
+                   program_name, VERSION BUILDNR);
             exit(EXIT_SUCCESS);
 
         case 'v':
@@ -404,15 +406,15 @@ usage(void)
            "  --accept-vconn=REGEX    accept matching discovered controllers\n"
            "  --exit-without-bind     exit after discovery, without binding\n"
            "  --exit-after-bind       exit after discovery, after binding\n"
-           "  --no-detach             do not detach after discovery\n"
-           "\nOther options:\n"
+           "  --no-detach             do not detach after discovery\n",
+           program_name, program_name);
+    vlog_usage();
+    printf("\nOther options:\n"
            "  -t, --timeout=SECS      give up discovery after SECS seconds\n"
            "  -P, --pidfile[=FILE]    create pidfile (default: %s/%s.pid)\n"
            "  -f, --force             with -P, start even if already running\n"
-           "  -v, --verbose=MODULE[:FACILITY[:LEVEL]]  set logging levels\n"
-           "  -v, --verbose           set maximum verbosity level\n"
            "  -h, --help              display this help message\n"
            "  -V, --version           display version information\n",
-           program_name, program_name, RUNDIR, program_name);
+           ofp_rundir, program_name);
     exit(EXIT_SUCCESS);
 }