SERIALSTDIO=""
KVM_ENABLED="no"
KVM_ACTIVE="no"
+GRAPHIC="yes"
+PUBLICVNC="no"
# Determine whether the file is a kernel or QEMU image, and set the
# appropriate variables
ISOFS=true
;;
"nographic")
- SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
- SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+ GRAPHIC="no"
;;
"serial")
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
;;
"publicvnc")
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
+ PUBLICVNC="yes"
;;
"") break ;;
*)
fi
fi
+# Disable graphic when no DISPLAY or -nographic is specified.
+if [ "$GRAPHIC" = "no" ] || [ -z "$DISPLAY" -a "$PUBLICVNC" = "no" ] ; then
+ echo "Disabling graphic."
+ SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
+ SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+fi
+
machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
# MACHINE is now set for all cases