From 50bda8cf171f3fd896342e288d89f709d7636b95 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 16 Nov 2015 14:07:32 -0800 Subject: [PATCH] livemedia-creator: Check kickstart for shutdown (#1207959) When using virt with livemedia-creator the kickstart needs to include shutdown to make sure it doesn't hang at the end of the installation. --- src/sbin/livemedia-creator | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sbin/livemedia-creator b/src/sbin/livemedia-creator index 614f4193..3c4e1077 100755 --- a/src/sbin/livemedia-creator +++ b/src/sbin/livemedia-creator @@ -38,6 +38,7 @@ from math import ceil # Use pykickstart to calculate disk image size from pykickstart.parser import KickstartParser from pykickstart.version import makeVersion +from pykickstart.constants import KS_SHUTDOWN # Use Mako templates for appliance builder descriptions from mako.template import Template @@ -1338,6 +1339,9 @@ def main(): errors.append("Filesystem images must use a single / part, not autopart or " "multiple partitions. swap is allowed but not used.") + if not opts.no_virt and ks.handler.reboot.action != KS_SHUTDOWN: + errors.append("The kickstart must include shutdown when using virt installation.") + if errors: list(log.error(e) for e in errors) sys.exit(1)