From: Frank Brehm Date: Wed, 11 Oct 2023 11:53:15 +0000 (+0200) Subject: Unregistring from Red Hat nearly complete template. X-Git-Tag: 3.0.0^2~5 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=9348bb80d5729f9482bb83d9533b42c7fb868296;p=pixelpark%2Fcreate-vmware-tpl.git Unregistring from Red Hat nearly complete template. --- diff --git a/lib/cr_vmware_tpl/handler/vm.py b/lib/cr_vmware_tpl/handler/vm.py index 3ba38b3..28b5057 100644 --- a/lib/cr_vmware_tpl/handler/vm.py +++ b/lib/cr_vmware_tpl/handler/vm.py @@ -26,7 +26,7 @@ from fb_tools.errors import HandlerError, ExpectedHandlerError from .. import print_section_start, print_section_end from ..xlate import XLATOR -__version__ = '0.2.0' +__version__ = '0.2.1' LOG = logging.getLogger(__name__) @@ -285,6 +285,7 @@ class HandlerVmMixin(): '/var/log/wtmp', '/var/log/vmware-*.log*', '/var/log/yum*.log', + '/var/log/rhsm/*.log' ) cmd = textwrap.dedent("""\ @@ -302,6 +303,14 @@ class HandlerVmMixin(): fi done + if [ -x /sbin/subscription-manager ] ; then + echo + echo "Unregistring current host from Red Hat Subscription Management ..." + /sbin/subscription-manager unregister --no-progress-messages + sleep 2 + fi + + echo for f in @@@LOGFILES@@@ ; do if [ -f "${f}" ] ; then echo "Truncating ${f} ..."