]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
rcS: Fix nofb to not run drfb_load, and under PVonHVM still retain ttyS0.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 24 Feb 2011 17:43:33 +0000 (12:43 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 24 Feb 2011 17:43:33 +0000 (12:43 -0500)
root_image/etc/init.d/rcS

index 31f6c921e3d7bf590c717e1fbdb838d13b85c21d..c8480f8f42b28e61e03fd0eb459a443cbb1ad670 100755 (executable)
@@ -69,17 +69,19 @@ echo "*.*     /dev/console" > /etc/syslog.conf
 echo "*.*     /var/log/messages" >> /etc/syslog.conf
 /sbin/syslogd
 
-/usr/bin/xen-detect -N -q
-if [ $? == 1 ]; then
+/usr/bin/xen-detect -P
+if [ $? == 0 ]; then
        modprobe evtchn
        modprobe xen_evtchn
        /etc/init.d/xencommons start
        /etc/init.d/xend start
        rm -f /dev/ttyS0
        ln -s /dev/null /dev/ttyS0
+       sed -i 's/\(^ttyS0.*\)/# \1/' /etc/inittab
 else
        rm -f /dev/hvc0
        ln -s /dev/null /dev/hvc0
+       sed -i 's/\(^hvc0.*\)/# \1/' /etc/inittab
        echo "You might have to do kill -1 1 if you see 'can't open /dev/hvc0'"
 fi
 PATH=$PATH:/usr/bin:/usr/sbin
@@ -89,10 +91,9 @@ lspci
 cat /proc/interrupts
 cat /proc/iomem
 
-local NOFB=0
 NOFB=$(boot_parameter 'nofb')
 if [ $? == 0 ]; then
-       NOFB=1
+       NOFB="yes"
 fi
 
 TEST=$(boot_parameter 'test')
@@ -107,7 +108,7 @@ if [ $? == 0 ]; then
                        ;;
                dfb)
                        while (true); do dfbtest_fillrect; done &
-                       NOFB=1
+                       NOFB="yes"
                        ;;
                net)
                        netserver
@@ -115,7 +116,6 @@ if [ $? == 0 ]; then
                        ;;      
        esac
 fi
-
-if [ $NOFB -eq 0 ]; then
+if [ -z $NOFB ]; then
        drfb_load &
 fi