add bug closure to changelog
[debian/amanda] / client-src / amdump_client.pl
index 672c25927b27d000fc2bd3354706dafcc07f2898..f0fd0bbdd951c4602ff30f1210f6b062e47f6097 100644 (file)
@@ -1,5 +1,5 @@
 #! @PERL@
-# Copyright (c) 2010 Zmanda Inc.  All Rights Reserved.
+# Copyright (c) 2010-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
@@ -28,15 +28,18 @@ use IPC::Open3;
 use Amanda::Util qw( :constants );
 use Amanda::Config qw( :init :getconf );
 use Amanda::Paths;
-use Amanda::Logfile qw( log_rename get_current_log_timestamp $amanda_log_trace_log );
+use Amanda::Util qw ( match_disk );
 use Amanda::Debug qw( debug );
 
 Amanda::Util::setup_application("amdump_client", "client", $CONTEXT_CMDLINE);
 
 my $config;
 my $config_overrides = new_config_overrides($#ARGV+1);
+
+debug("Arguments: " . join(' ', @ARGV));
 Getopt::Long::Configure(qw{bundling});
 GetOptions(
+    'version' => \&Amanda::Util::version_opt,
     'config=s' => sub { $config = $_[1]; },
     'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); },
 ) or usage();
@@ -94,11 +97,11 @@ if ($cmd eq 'list') {
         #find the diskname that match
        for (my $i=1; $i <= $#ARGV; $i++) {
            for my $diskname (@disks) {
-               if (Amanda::Logfile::match_disk($ARGV[$i], $diskname)) {
+               if (match_disk($ARGV[$i], $diskname)) {
                    debug("send: DISK " . Amanda::Util::quote_string($diskname));
                    print {$amservice_in} "DISK " . Amanda::Util::quote_string($diskname) . "\n";
                    my $a = <$amservice_out>;
-                   print if ($a != /^DISK /)
+                   print if ($a !~ /^DISK /)
                }
            }
        }
@@ -117,7 +120,7 @@ if ($cmd eq 'list') {
         #find the diskname that match
        for (my $i=1; $i <= $#ARGV; $i++) {
            for my $diskname (@disks) {
-               if (Amanda::Logfile::match_disk($ARGV[$i], $diskname)) {
+               if (match_disk($ARGV[$i], $diskname)) {
                    debug("send: DISK " . Amanda::Util::quote_string($diskname));
                    print {$amservice_in} "DISK " . Amanda::Util::quote_string($diskname) . "\n";
                    my $a = <$amservice_out>;