add bug closure to changelog
[debian/amanda] / client-src / killpgrp.c
index d7472943dcc961b8437a7ce1faa7bebc0fb3c9b7..49f51b7b3bd2f4e2aab73538b7e064d643583edb 100644 (file)
@@ -34,8 +34,8 @@
  *
  */
 #include "amanda.h"
-#include "version.h"
 #include "util.h"
+#include "conffile.h"
 
 #ifdef HAVE_GETPGRP
 #ifdef GETPGRP_VOID
@@ -61,6 +61,11 @@ main(
     char *exitstr;
     amwait_t status;
 
+    if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("killpgrp-%s\n", VERSION);
+       return (0);
+    }
+
     /*
      * Configure program for internationalization:
      *   1) Only set the message locale for now.
@@ -76,11 +81,13 @@ main(
     set_pname("killpgrp");
 
     dbopen(DBG_SUBDIR_CLIENT);
+    config_init(CONFIG_INIT_CLIENT, NULL);
+
     if (argc < 2) {
        error("Need at least 2 arguments\n");
        /*NOTREACHED*/
     }
-    dbprintf(_("version %s\n"), version());
+    dbprintf(_("version %s\n"), VERSION);
     dbprintf(_("config: %s\n"), argv[1]);
     if (strcmp(argv[1], "NOCONFIG") != 0)
        dbrename(argv[1], DBG_SUBDIR_CLIENT);