]> xenbits.xensource.com Git - osstest.git/commitdiff
ts-debian-install: work around xen-create-image reliance on xend flight-22465 flight-22467 flight-22468 flight-22471 flight-22472 flight-22473 flight-22477 flight-22486 flight-22495 flight-22512 flight-22524 flight-22543 flight-22547 flight-22553 flight-22559 flight-22561 flight-22568 flight-22574 flight-22580 flight-22586 flight-22592 flight-22599 flight-22604 flight-22605 flight-22610 flight-22629 flight-22634 flight-22639 flight-22640 flight-22641 flight-22642 flight-22644 flight-22646 flight-22652 flight-22653 flight-22656 flight-22658 flight-22663 flight-22666 flight-22668 flight-22669 flight-22670 flight-22672 flight-22683 flight-22686 flight-22687 flight-22690 flight-22691 flight-22694 flight-22720 flight-22747 flight-22768 flight-22776 flight-22779 flight-22780 flight-22795 flight-22826 flight-22832 flight-22863 flight-22873 flight-22885 flight-22893 flight-22904 flight-22932 flight-22934 flight-22966 flight-22977 flight-22987 flight-23003 flight-23010 flight-23035 flight-23037 flight-23070 flight-23079 flight-23090 flight-23168 flight-23187 flight-23203 flight-23211 flight-23237 flight-23269 flight-23289 flight-23312 flight-23368 flight-23378 flight-23691 flight-23699 flight-23724 flight-23725 flight-23759 flight-23767 flight-23778 flight-23794 flight-23802 flight-23827 flight-23829 flight-23862 flight-23873 flight-23882 flight-23897 flight-23905 flight-23933 flight-23938 flight-23967 flight-23980 flight-23990 flight-24005 flight-24014 flight-24041 flight-24042
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} \\