# HG changeset patch
# User john.levon@sun.com
# Date 1233790091 28800
# Node ID 43ef4509832aea50d4812aa33fa46a1f650c196d
# Parent 507b2f948f3b1f4a1a844493e4de67a1f8938f6c
Kill console process if control-C is pressed
self._os_type = None
self._os_variant = None
@@ -940,6 +941,7 @@ class Guest(object):
wait=True):
"""Do the startup of the guest installation."""
self.validate_parms()
+ self._consolechild = None
if meter is None:
# BaseMeter does nothing, but saves a lot of null checking
@@ -1002,6 +1004,7 @@ class Guest(object):
if consolecb:
logging.debug("Launching console callback")
child = consolecb(self.domain)
+ self._consolechild = child
boot_xml = self.get_config_xml(install = False)
logging.debug("Saving XML boot config:
%s" % boot_xml)
@@ -1038,6 +1041,7 @@ class Guest(object):
if consolecb:
logging.debug("Launching console callback")
child = consolecb(self.domain)
+ self._consolechild = child
if child and wait: # if we connected the console, wait for it to finish
try:
@@ -1102,6 +1106,10 @@ class Guest(object):
raise RuntimeError(_("Invalid dictionary entry for device '%s %s'" %
(device_key, param)))
+ def terminate_console(self):
+ if self._consolechild:
+ os.kill(self._consolechild, signal.SIGKILL)
+
def _wait_for_domain(conn, name):
# sleep in .25 second increments until either a) we get running
# domain ID or b) it's been 5 seconds. this is so that
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools