lintian doesn't like orphan packages with uploaders...
[debian/amanda] / installcheck / amrecover.pl
index fa1ffca45cbb4ff35b8bbe40e8603f3bb649ed4e..341ce6639846df70d45dbea3845b5d866aa1e8f2 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (c) 2008, 2009, 2010 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2008-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
@@ -79,8 +80,9 @@ sub run_amrecover {
     my @commands = @{$params{'commands'}};
 
     cleandir();
+    my @h_opt = ('-h', 'localhost') unless $set_host_succeed;
     $exp = Installcheck::Run::run_expect('amrecover', 'TESTCONF',
-       '-t', 'localhost', '-o', 'auth=local');
+       @h_opt, '-s', 'localhost', '-t', 'localhost', '-o', 'auth=local');
     $exp->log_stdout($debug);
 
     @results = ();
@@ -138,7 +140,7 @@ run_amrecover(
 
 is_deeply([ @results ], [
        'server-ready', 'config-set',
-       ($set_host_succeed) ? 'host-set' : 'use-sethost',
+       'host-set',
        '> sethost localhost',
        'host-set',
        "> setdisk $diskname",
@@ -171,7 +173,7 @@ run_amrecover(
 
 is_deeply([ @results ], [
        'server-ready', 'config-set',
-       ($set_host_succeed) ? 'host-set' : 'use-sethost',
+       'host-set',
        '> sethost localhost ',
        'host-set',
        '> sethost localhost',