summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-24 11:14:16 -0400
committerJim Meyering <jim@meyering.net>2006-10-24 11:14:16 -0400
commit4df0093613a32a3bc6c8d3caa835b20c508939b4 (patch)
tree4a0f023c73a4c89520ddaac2e3e00383887214ff
parent67d49c2f21c8348a3b431b9d7e1cb2d5828f15c6 (diff)
downloadcobbler-4df0093613a32a3bc6c8d3caa835b20c508939b4.tar.gz
cobbler-4df0093613a32a3bc6c8d3caa835b20c508939b4.tar.xz
cobbler-4df0093613a32a3bc6c8d3caa835b20c508939b4.zip
Backing out non-interactive changes as they are needed to wait for the xen install to finish (will come up with something better?).
Also fixing a few bugs related to potentially null fields.
-rwxr-xr-xkoan/app.py20
-rwxr-xr-xkoan/xencreate.py9
2 files changed, 16 insertions, 13 deletions
diff --git a/koan/app.py b/koan/app.py
index 4a36b84a..cfc77af4 100755
--- a/koan/app.py
+++ b/koan/app.py
@@ -67,10 +67,12 @@ def main():
dest="verbose",
action="store_false",
help="run (more) quietly")
- p.add_option("-i", "--interactive",
- dest="interactive",
- action="store_true",
- help="don't run in batch mode (xen only)")
+ # backing this out as the xm console bit is currently needed
+ # during install... a better / more permanent fix is preferred.
+ #p.add_option("-i", "--interactive",
+ # dest="interactive",
+ # action="store_true",
+ # help="don't run in batch mode (xen only)")
(options, args) = p.parse_args()
full_access = 1
@@ -92,7 +94,7 @@ def main():
k.profile = options.profile
k.system = options.system
k.verbose = options.verbose
- k.interactive = options.interactive
+ #k.interactive = options.interactive
k.run()
except InfoException, ie:
print str(ie)
@@ -127,7 +129,7 @@ class Koan:
self.is_xen = None
self.is_auto_kickstart = None
self.dryrun = None
- self.interactive = False
+ # self.interactive = False
def run(self):
if self.server is None:
@@ -418,6 +420,8 @@ class Koan:
"""
Return whether the argument is a mac address.
"""
+ if strdata is None:
+ return False
strdata = strdata.upper()
if re.search(r'[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F:0-9]{2}:[A-F:0-9]{2}',strdata):
return True
@@ -558,8 +562,8 @@ class Koan:
uuid=xencreate.get_uuid(self.calc_xen_uuid(pd)),
kernel=dd['kernel_local'],
initrd=dd['initrd_local'],
- extra=kextra,
- interactive=self.interactive
+ extra=kextra
+ # interactive=self.interactive
)
print results
diff --git a/koan/xencreate.py b/koan/xencreate.py
index e9af5db9..9c7886ac 100755
--- a/koan/xencreate.py
+++ b/koan/xencreate.py
@@ -195,11 +195,10 @@ def start_paravirt_install(name=None, ram=None, disk=None, mac=None,
raise XenCreateException("Unable to create domain for guest")
cmd = ["/usr/sbin/xm", "console", "%s" %(dom.ID(),)]
- if interactive:
- child = os.fork()
- if (not child):
- os.execvp(cmd[0], cmd)
- os._exit(1)
+ child = os.fork()
+ if (not child):
+ os.execvp(cmd[0], cmd)
+ os._exit(1)
time.sleep(5)
os.unlink(kfn)
os.unlink(ifn)