# HG changeset patch
# User john.levon@xxxxxxx
# Date 1163095747 28800
# Node ID 6750c8c56b5f139c2b227472d8b9e1f9555fdb6f
# Parent e2c100dfcb05d8f29d612c29af2edf1dcfd3f7fc
Use pygrub automatically if no kernel is specified.
Signed-off-by: John Levon <john.levon@xxxxxxx>
diff --git a/tools/python/xen/xend/osdep.py b/tools/python/xen/xend/osdep.py
--- a/tools/python/xen/xend/osdep.py
+++ b/tools/python/xen/xend/osdep.py
@@ -20,17 +20,20 @@ import os
import os
_scripts_dir = {
- "Linux": "/etc/xen/scripts",
"SunOS": "/usr/lib/xen/scripts",
}
_xend_autorestart = {
- "Linux": True,
"SunOS": False,
+}
+
+_pygrub_path = {
+ "SunOS": "/usr/lib/xen/bin/pygrub"
}
def _get(var, default=None):
return var.get(os.uname()[0], default)
scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
-xend_autorestart = _get(_xend_autorestart)
+xend_autorestart = _get(_xend_autorestart, True)
+pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")
diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py
+++ b/tools/python/xen/xm/create.py
@@ -27,6 +27,7 @@ import xmlrpclib
import xmlrpclib
from xen.xend import sxp
+from xen.xend import osdep
from xen.xend import PrettyPrint
import xen.xend.XendClient
from xen.xend.XendClient import server
@@ -951,7 +952,7 @@ def preprocess_vnc(vals):
def preprocess(vals):
if not vals.kernel and not vals.bootloader:
- err("No kernel specified")
+ vals.bootloader = osdep.pygrub_path
preprocess_disk(vals)
preprocess_pci(vals)
preprocess_ioports(vals)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|