From ee633c16ad74fef829ee0a1a438aec85df7653f3 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 23 Jun 2020 10:42:04 +0200 Subject: [PATCH] Display of Postinstall Log --- kickstart/template-centos8.ks | 2 +- lib/cr_vmware_tpl/handler.py | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/kickstart/template-centos8.ks b/kickstart/template-centos8.ks index d3784d7..f1adae4 100644 --- a/kickstart/template-centos8.ks +++ b/kickstart/template-centos8.ks @@ -117,7 +117,7 @@ exec < /dev/console &> >(tee -a "$POST_LOG") ### debug -set -x +# set -x echo "cobbler profile = $profile_name" echo diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index 30bf869..e87e097 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -42,7 +42,7 @@ from .cobbler import CobblerError, Cobbler from .xlate import XLATOR -__version__ = '1.7.3' +__version__ = '1.7.4' LOG = logging.getLogger(__name__) TZ = pytz.timezone('Europe/Berlin') @@ -310,8 +310,7 @@ class CrTplHandler(BaseHandler): return 10 else: self.poweroff_vm() - - self.cobbler.remove_system(tpl_sysname) + self.cobbler.remove_system(tpl_sysname) return 0 @@ -680,6 +679,24 @@ class CrTplHandler(BaseHandler): fi done + if [ -f /var/log/anaconda/post-install.log ] ; then + echo + echo "Post install log:" + echo + echo "-----------------------------------------------------------" + cat /var/log/anaconda/post-install.log + echo "-----------------------------------------------------------" + echo + else + echo + echo "###########################################################" + echo + echo "Post install log not found!" + echo + echo "###########################################################" + echo + fi + """) try: -- 2.39.5