From: Konrad Rzeszutek Wilk Date: Fri, 16 Mar 2012 16:10:38 +0000 (-0400) Subject: rcS: Support running with Xen 4.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b4869a572e8244e80a2ea1ffb44751584ef8ae89;p=xentesttools%2Fbootstrap.git rcS: Support running with Xen 4.0 Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/root_image/etc/init.d/rcS b/root_image/etc/init.d/rcS index 6d8d8f1..dab3cfa 100755 --- a/root_image/etc/init.d/rcS +++ b/root_image/etc/init.d/rcS @@ -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"