lintian doesn't like orphan packages with uploaders...
[debian/amanda] / server-src / amtrmlog.c
index 530fcf5b8af5aeab92f7db1d8a7fbcdce369c83c..01193e832b8be4bc184c51bb32d01d552f717dd9 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
@@ -37,7 +38,6 @@
 #include "diskfile.h"
 #include "tapefile.h"
 #include "find.h"
-#include "version.h"
 
 int amtrmidx_debug = 0;
 
@@ -65,7 +65,12 @@ main(
     char *conf_tapelist;
     char *conf_logdir;
     int dumpcycle;
-    config_overwrites_t *cfg_ovr = NULL;
+    config_overrides_t *cfg_ovr = NULL;
+
+    if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("amtrmlog-%s\n", VERSION);
+       return (0);
+    }
 
     /*
      * Configure program for internationalization:
@@ -84,7 +89,7 @@ main(
     /* Don't die when child closes pipe */
     signal(SIGPIPE, SIG_IGN);
 
-    cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
+    cfg_ovr = extract_commandline_config_overrides(&argc, &argv);
 
     if (argc > 1 && strcmp(argv[1], "-t") == 0) {
        amtrmidx_debug = 1;
@@ -98,10 +103,10 @@ main(
     }
 
     dbopen(DBG_SUBDIR_SERVER);
-    dbprintf(_("%s: version %s\n"), argv[0], version());
+    dbprintf(_("%s: version %s\n"), argv[0], VERSION);
 
+    set_config_overrides(cfg_ovr);
     config_init(CONFIG_INIT_EXPLICIT_NAME, argv[1]);
-    apply_config_overwrites(cfg_ovr);
 
     conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
     read_diskfile(conf_diskfile, &diskl);