Try this one!

Jean-Louis

Jon LaBadie wrote:
On Sat, Oct 02, 2010 at 04:24:46PM -0500, Dustin J. Mitchell wrote:
On Sat, Oct 2, 2010 at 1:03 PM, Jon LaBadie <[email protected]> wrote:
When running "amtape --help" the "usage" message
is printed twice.
A *real* nitpick!  Cool!

Fix is here:
  http://github.com/djmitche/amanda/commit/z12091

If that works for you, let me know and I will commit.  You should be
able to apply it directly to /usr/sbin/amtape.

Unfortunately no, the patch had no effect.

Jon

diff --git a/server-src/amtape.pl b/server-src/amtape.pl
index 8312387..c91ade3 100644
--- a/server-src/amtape.pl
+++ b/server-src/amtape.pl
@@ -45,7 +45,9 @@ my %subcommands;
 
 sub usage {
     my ($finished_cb) = @_;
-    $finished_cb ||= sub { exit(1); };
+
+    $finished_cb = sub { exit(1); } if (!$finished_cb or !(ref($finished_cb) eq "CODE"));
+
 
     print STDERR <<EOF;
 Usage: amtape <conf> <command> {<args>} [-o configoption]*

Reply via email to