X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famoverview.pl;h=eb53a3f1475f5676a075bb65f491c01a5d18e90c;hb=HEAD;hp=d1c599b00a28650059fbd5ab88648e794ce4bf48;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/server-src/amoverview.pl b/server-src/amoverview.pl index d1c599b..eb53a3f 100644 --- a/server-src/amoverview.pl +++ b/server-src/amoverview.pl @@ -1,9 +1,10 @@ #!@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 -# 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 @@ -45,6 +46,7 @@ END } # overrideable defaults +my $opt_version; my $opt_config = undef; my $opt_hostwidth = 8; my $opt_diskwidth = 20; @@ -54,7 +56,8 @@ my $opt_num0 = 0; my $opt_togo0 = 0; my $opt_verbose = 0; -GetOptions('config=s' => \$opt_config, +GetOptions('version' => \$opt_version, + 'config=s' => \$opt_config, 'hostwidth=i' => \$opt_hostwidth, 'diskwidth=i' => \$opt_diskwidth, 'skipmissed' => \$opt_skipmissed, @@ -64,6 +67,11 @@ GetOptions('config=s' => \$opt_config, 'verbose' => \$opt_verbose) or Usage(); +if (defined $opt_version) { + print "amoverview-" . $Amanda::Constants::VERSION , "\n"; + exit 0; +} + unless(defined($opt_config)) { if (@ARGV == 1) { $opt_config = $ARGV[0];