Imported Upstream version 3.3.3
[debian/amanda] / client-src / killpgrp.c
index d7472943dcc961b8437a7ce1faa7bebc0fb3c9b7..ad257ae289cc8dbd24b87623af024f8cefbcf310 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
  * Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
  * All Rights Reserved.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -34,8 +35,8 @@
  *
  */
 #include "amanda.h"
-#include "version.h"
 #include "util.h"
+#include "conffile.h"
 
 #ifdef HAVE_GETPGRP
 #ifdef GETPGRP_VOID
@@ -61,6 +62,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 +82,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);