]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
ts-debian-install: work around xen-create-image reliance on xend
authorIan Campbell <ian.campbell@citrix.com>
Wed, 18 Dec 2013 09:32:04 +0000 (09:32 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 18 Dec 2013 14:58:12 +0000 (14:58 +0000)
The xen-tools script contains some sanity checks of the xend configuration and
fails if the configuration file is not present. This issue has been reported
upstream http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732456.

Workaround this issue by creating a dummy xend-config.sxp if it does not
already exist. Include network- and vif- script options to keep the sanity
checks happy.

The workaround is enabled for all releases up to and including Wheezy in the
hopes that this will be fixed by the time Jessie is released, if not then the
osstest pushgate will hopefully catch this when Jessie is pushed to it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
ts-debian-install

index 519edc96cb0a72b5cf18b704b4cd9fe99000d9c9..58ea743f2e994d437c0d9830d1017283ef9c4d3e 100755 (executable)
@@ -62,7 +62,20 @@ sub ginstall () {
        $initrd =~ s,/vmlinuz-,/initrd.img-, or die "$initrd ?";
     }
     my $initrd_opt = $initrd eq 'none' ? '' : "--initrd $initrd";
-    
+
+    if ($ho->{Suite} =~ m/lenny|squeeze|wheezy/) {
+        target_cmd_root($ho, <<END, 10);
+            set -e
+            # xen-create-image requires this to exists (see Debian bug #732456)
+            # even though it is otherwise quite happy on a pure xl system.
+            if [ ! -f /etc/xen/xend-config.sxp ] ; then
+                # xen-create-image checks for these and warns if they don't
+                # exist or are set to "dummy"
+                echo "(vif-script osstest)" >>/etc/xen/xend-config.sxp
+                echo "(network-script osstest)" >>/etc/xen/xend-config.sxp
+            fi
+END
+    }
     target_cmd_root($ho, <<END, 2000);
         xen-create-image \\
             --dhcp --mac $gho->{Ether} \\