]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
Fix mg-hosts mkpxedir
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 19 Aug 2014 10:31:17 +0000 (11:31 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 19 Aug 2014 10:31:17 +0000 (11:31 +0100)
 * Have selecthost no longer demand that $job is set; if it is not,
   simply do not set Suite (which of course ultimately comes from
   runvars and hence the job).

 * Add missing use Osstest::TestSupport.

 * Mention the need to run it in README.dev.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/TestSupport.pm
README.dev
mg-hosts

index fea54d599538e0c3d0e6d1ca0285183982280704..1d7793311129506e8e5504ebd362b5ab63dcc2de 100644 (file)
@@ -751,8 +751,11 @@ sub selecthost ($) {
         Name => $name,
         TcpCheckPort => 22,
         Info => [],
-        Suite => get_runvar_default("${ident}_suite",$job,$c{DebianSuite}),
     };
+    if (defined $job) {
+       $ho->{Suite} = get_runvar_default("${ident}_suite",$job,
+                                         $c{DebianSuite});
+    }
 
     #----- calculation of the host's properties -----
 
index d99c5c70caa59244591e6c959f4e41802f3926a5..eb726592fadfce0a7643cf5fbd5199e06b9cd321 100644 (file)
@@ -42,6 +42,8 @@ $ mg-hosts setprops marilith-n4 -- dhcp-watch-method 'leases dhcp3 dns-cam1.uk.x
 Handles multiple hosts:
 $ mg-hosts setprops HOSTA HOSTB -- "PROP" "VALUE"
 
+$ mg-hosts mkpxedir HOSTA HOSTB
+
 Create a flight:
 $ FLIGHT=`OSSTEST_CONFIG=production-config ./cs-flight-create commission xen-unstable`
 $ echo $FLIGHT
index c9d31dfd67c60470fa1f064e8a04fd36141d47ef..26435488c83299372e6248adda428d0a23ebd875 100755 (executable)
--- a/mg-hosts
+++ b/mg-hosts
@@ -85,6 +85,7 @@
 use strict qw(vars refs);
 use DBI;
 use Osstest;
+use Osstest::TestSupport;
 
 csreadconfig();
 
@@ -110,10 +111,10 @@ sub cmd_mkpxedir () {
         system_checked(<<END);
             set -e
            cd $ho->{Tftp}{Path}$ho->{Tftp}{PxeDir}
-            sudo chown root.$ho->{Tftp}{PxeGroup} $macdir
-            sudo chmod 2775 $macdir
-            sudo rm -f $hn
-            sudo ln -s $macdir $hn
+            $sudo chown root.$ho->{Tftp}{PxeGroup} $macdir
+            $sudo chmod 2775 $macdir
+            $sudo rm -f $hn
+            $sudo ln -s $macdir $hn
             ls -ald $hn $macdir
 END
     }