X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Famdevcheck.pl;h=80477013873dec1499081a831c4c8d727b83b29c;hb=HEAD;hp=fe47f3a3352839b4720d441f041bdb2ddf9a11f3;hpb=d5853102f67d85d8e169f9dbe973ad573306c215;p=debian%2Famanda diff --git a/device-src/amdevcheck.pl b/device-src/amdevcheck.pl index fe47f3a..8047701 100644 --- a/device-src/amdevcheck.pl +++ b/device-src/amdevcheck.pl @@ -1,9 +1,10 @@ #! @PERL@ -# Copyright (c) 2009 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2009-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 @@ -21,6 +22,7 @@ use lib '@amperldir@'; use Getopt::Long; use strict; +use warnings; use Amanda::Device qw( :constants ); use Amanda::Config qw( :getconf :init ); use Amanda::Debug qw( :logging ); @@ -78,7 +80,7 @@ sub print_result { sub usage { print < [ ] [ --properties {prop1,prop2,prop3} ] +Usage: amdevcheck [--label] [--properties {prop1,prop2,prop3}] [-o configoption]* [] EOF exit(1); } @@ -92,8 +94,10 @@ my $getproplist; my $device_name; my $print_label; +debug("Arguments: " . join(' ', @ARGV)); Getopt::Long::Configure(qw(bundling)); GetOptions( + 'version' => \&Amanda::Util::version_opt, 'help|usage|?' => \&usage, 'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); }, 'properties:s' => \$getproplist,