Imported Upstream version 3.3.3
[debian/amanda] / client-src / rundump.c
index d6772fa57d03925cf615d8cd943d18c1545a4fb9..9788e97e27296084fce248d9dcb434d03f2863a8 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
@@ -33,9 +34,9 @@
  * argv[2] will be argv[0] of the DUMP program
  * ...
  */
-#include "util.h"
 #include "amanda.h"
-#include "version.h"
+#include "util.h"
+#include "conffile.h"
 
 int main(int argc, char **argv);
 
@@ -66,6 +67,11 @@ main(
     char *cmdline;
 #endif /* ERRMSG */
 
+    if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("rundump-%s\n", VERSION);
+       return (0);
+    }
+
     /*
      * Configure program for internationalization:
      *   1) Only set the message locale for now.
@@ -84,12 +90,14 @@ main(
     signal(SIGPIPE, SIG_IGN);
 
     dbopen(DBG_SUBDIR_CLIENT);
+    config_init(CONFIG_INIT_CLIENT, NULL);
+
     if (argc < 3) {
        error(_("Need at least 3 arguments\n"));
        /*NOTREACHED*/
     }
 
-    dbprintf(_("version %s\n"), version());
+    dbprintf(_("version %s\n"), VERSION);
 
 #ifdef ERRMSG                                                  /* { */