Merge tag 'upstream/3.3.2'
[debian/amanda] / common-src / amgetconf.pl
index 23a9f1e93e484808548ea5f3b25d85346c71083e..b35cf20fcb268ab49635e3d8d937f511e8b75faf 100644 (file)
@@ -1,5 +1,5 @@
 #! @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
@@ -25,6 +25,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 +351,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();