# -------------------------------------------------------------------------
def show_install_log(self):
- LOG.info(_("Showing post install log ..."))
- install_logfile = '/var/log/anaconda/post-install.log'
-
- cmd = textwrap.dedent("""\
- if [ -f {log} ] ; then
- echo "-----------------------------------------------------------"
- cat {log}
- echo "-----------------------------------------------------------"
- echo
- else
- echo "Post install log {log} not found!" >&2
- fi
+ logfiles = ['ks-pre.log', 'ks-pre-install.log', 'post-install.log']
+ lf_desc = {
+ 'ks-pre.log': 'Pre all log',
+ 'ks-pre-install.log': 'Pre install log',
+ 'post-install.log': 'Post install log',
+ }
+
+ for logfile in logfiles:
+ lf = '/var/log/anaconda/' + logfile
+ desc = lf_desc[logfile]
+
+ LOG.info(_("Showing {desc} {lf!r} ...".format(desc=desc, lf=lf)))
+
+ cmd = textwrap.dedent("""\
+ if [ -f {log} ] ; then
+ echo "-----------------------------------------------------------"
+ cat {log}
+ echo "-----------------------------------------------------------"
+ echo
+ else
+ echo "Post install log {log} not found!" >&2
+ fi
- """).format(log=install_logfile)
+ """).format(log=lf)
- result = self.exec_remote(cmd)
+ result = self.exec_remote(cmd)
- if result['err']:
- LOG.error(result['err'])
- if self.postinstall_errors:
- self.postinstall_errors += result['err']
+ if result['err']:
+ LOG.error(result['err'])
+ if self.postinstall_errors:
+ self.postinstall_errors += result['err']
+ else:
+ self.postinstall_errors = result['err']
else:
- self.postinstall_errors = result['err']
- else:
- LOG.debug("Post install log:\n\n" + result['out'])
+ LOG.debug("{}:\n\n".format(desc) + result['out'])
# -------------------------------------------------------------------------
def get_postinstall_error(self):
# Do not configure the X Window System
skipx
-# Installation logging level
-logging --level=debug
-
# Reboot after installation
reboot
%pre-install --interpreter=/bin/bash --log=/var/log/ks-pre-install.log
#raw
echo "[$( date --rfc-3339=seconds )]: Pre installation tasks ..."
+
+echo
+echo "LVM:"
+
+echo
+echo "pvs"
+pvs --units m
+
+echo
+echo "vgs"
+vgs --units m
+
+echo
+echo "lvs"
+lvs --units m
+
#end raw
%end
fi
+#raw
echo
echo "Linux kernel versions:"
rpm -qa | grep -i kernel | sort -i
grubby --default-index
grubby --default-title
grubby --default-kernel
+#end raw
-echo
-echo "LVM:"
-
-echo
-echo "pvs"
-pvs --units m
-
-echo
-echo "vgs"
-vgs --units m
-
-echo
-echo "lvs"
-lvs --units m
### remove unnecessary directory
rm -rf /var/var
echo "Mangling /etc/lvm/lvm.conf ..."
sed -i -e 's/^\(.*\)# use_devicesfile.*/\1use_devicesfile = 0/' /etc/lvm/lvm.conf
echo
-grep devicesfile /etc/lvm/lvm.conf
-# end raw
+grep -C 2 devicesfile /etc/lvm/lvm.conf
+#end raw
###############################################################################
# Performing snippets
#end raw
%end
-# Last line
+# vim: filetype=kickstart