lintian doesn't like orphan packages with uploaders...
[debian/amanda] / common-src / amgetconf.pl
index 23a9f1e93e484808548ea5f3b25d85346c71083e..0a8b1a5b36e05dc1989d905f4f3333064a578570 100644 (file)
@@ -1,9 +1,10 @@
 #! @PERL@
-# Copyright (c) 2008, 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2008-2012 Zmanda, Inc.  All Rights Reserved.
 #
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -25,6 +26,7 @@ use Amanda::Debug qw( :logging );
 use Amanda::Util qw( :constants );
 use Amanda::Paths;
 use Amanda::Constants;
+eval 'use Amanda::Disklist;';  # can fail if compiled for client only
 use Getopt::Long;
 
 # Implementation note: this application is a bit funny, because it does not
@@ -350,6 +352,14 @@ if ($cfgerr_level >= $CFGERR_WARNINGS) {
 
 Amanda::Util::finish_setup($RUNNING_AS_ANY);
 
+if ($execute_where != $CONFIG_INIT_CLIENT) {
+    my $diskfile = Amanda::Config::config_dir_relative(getconf($CNF_DISKFILE));
+    $cfgerr_level = Amanda::Disklist::read_disklist('filename' => $diskfile);
+#    if ($cfgerr_level >= $CFGERR_ERRORS) {
+#      die "Errors processing disklist";
+#    }
+}
+
 conf_param($parameter, $opt_list);
 
 Amanda::Util::finish_application();