oops, references to the server /var/log/amanda directory in rules, too
[debian/amanda] / client-src / killpgrp.c
index 3749e328413084e35be1170689acb9a4b80da5d7..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);
@@ -100,7 +107,6 @@ main(
        /*NOTREACHED*/
     }
 
-    /* Consume any extranious input */
     signal(SIGTERM, term_kill_soft);
 
     /* Consume any extranious input */