projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f0123a
)
xend: Fix missing boolean xend config options
author
Keir Fraser
<keir@xensource.com>
Thu, 1 Nov 2007 09:36:46 +0000
(09:36 +0000)
committer
Keir Fraser
<keir@xensource.com>
Thu, 1 Nov 2007 09:36:46 +0000
(09:36 +0000)
If a boolean option was missing in the SCF database, we weren't
processing the default value correctly.
Signed-off-by: John Levon <john.levon@sun.com>
tools/python/xen/xend/XendOptions.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xend/XendOptions.py
b/tools/python/xen/xend/XendOptions.py
index 8f2cca3b33b9d541ffb64d40fd89f888e93c6dce..4542323cf4fea526772706e8c3b7f1943124b43a 100644
(file)
--- a/
tools/python/xen/xend/XendOptions.py
+++ b/
tools/python/xen/xend/XendOptions.py
@@
-386,6
+386,10
@@
if os.uname()[0] == 'SunOS':
return scf.get_bool(name)
except scf.error, e:
if e[0] == scf.SCF_ERROR_NOT_FOUND:
+ if val in ['yes', 'y', '1', 'on', 'true', 't']:
+ return True
+ if val in ['no', 'n', '0', 'off', 'false', 'f']:
+ return False
return val
else:
raise XendError("option %s: %s:%s" % (name, e[1], e[2]))