]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
rcS: Support running with Xen 4.0
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 16 Mar 2012 16:10:38 +0000 (12:10 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 16 Mar 2012 16:14:43 +0000 (12:14 -0400)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
root_image/etc/init.d/rcS

index 6d8d8f1903c4a44d24b57bf722f403ec2e618b34..dab3cfadf627635864fdf4011a8b630970043e81 100755 (executable)
@@ -83,10 +83,23 @@ echo "*.*     /dev/console" > /etc/syslog.conf
 echo "*.*     /var/log/messages" >> /etc/syslog.conf
 /sbin/syslogd
 
-if [ `cat /sys/hypervisor/type` == "xen" ]; then
+XEND_LOAD=0
+if [ -e /sys/hypervisor/type ]; then
+       if [ `cat /sys/hypervisor/type` == "xen" ]; then
+               xen-detect -H
+               if [ $? -ne 0 ]; then
+                       XEND_LOAD=1
+               fi
+       fi
+fi
+
+if [ $XEND_LOAD -eq 1 ]; then
        modprobe evtchn
        modprobe xen_evtchn
-       /etc/init.d/xencommons start
+       # Xen 4.0 can't deal with xencommons running first
+       if [ `xen-detect | sed -e 's/.*v//' -e 's/\.//g'` != 40 ]; then
+               /etc/init.d/xencommons start
+       fi
        /etc/init.d/xend start
        rm -f /dev/ttyS0
        ln -s /dev/null /dev/ttyS0
@@ -103,6 +116,7 @@ lsscsi
 lspci
 cat /proc/interrupts
 cat /proc/iomem
+cat /proc/meminfo
 
 if [ -x /init.late ]; then
        action $"Waiting for init.late"