Imported Upstream version 3.3.2
[debian/amanda] / installcheck / amrecover.pl
index fa1ffca45cbb4ff35b8bbe40e8603f3bb649ed4e..f7bedcc7b01a11a39359e66e549c843c1f374903 100644 (file)
@@ -1,4 +1,4 @@
-# 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
@@ -79,8 +79,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 +139,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 +172,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',