move activate-devpay to amanda-server, add a skeletal man page for it
[debian/amanda] / server-src / amoverview.pl
index 9990635a68b0bca0bb8470d771521544a9d20f32..d1c599b00a28650059fbd5ab88648e794ce4bf48 100644 (file)
@@ -31,17 +31,15 @@ use POSIX;
 
 sub Usage {
     print STDERR <<END;
-Usage: $0 [[--config] CONFIG] [--hostwidth width] [--diskwidth width]
-         [-skipmissed] [--last] [--num0] [--togo0] [--verbose]
+Usage: $0 [--hostwidth width] [--diskwidth width] [--skipmissed]
+         [--last] [--num0] [--togo0] [--verbose] [--config] <config>
 
 This script generates to standard output an overview of the filesystems
 dumped over time and the type of dump done on a particular day, such as
 a full dump, or an incremental, or if the dump failed.
 
-You may override the default configuration `@DEFAULT_CONFIG@' by using
-the --config command line option.  On larger installations, this script
-will take a while to run.  In this case, run it with --verbose to see
-how far along it is.
+On larger installations, this script will take a while to run.  In this case,
+run it with --verbose to see how far along it is.
 END
     exit 1;
 }
@@ -66,10 +64,12 @@ GetOptions('config=s'               => \$opt_config,
           'verbose'            => \$opt_verbose)
 or Usage();
 
-if(@ARGV == 1) {
-  $opt_config = $ARGV[0];
-} else {
-  Usage();
+unless(defined($opt_config)) {
+    if (@ARGV == 1) {
+       $opt_config = $ARGV[0];
+    } else {
+       Usage();
+    }
 }
 
 #Initialize configuration