From: Frank Brehm Date: Mon, 4 Apr 2022 07:33:36 +0000 (+0200) Subject: Disabling IPv6 in GRUB X-Git-Tag: 2.3.5^2~1^2 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=11b22ea95f0268f322bd085989e4fcd0780b1399;p=pixelpark%2Fcreate-vmware-tpl.git Disabling IPv6 in GRUB --- diff --git a/lib/cr_vmware_tpl/handler.py b/lib/cr_vmware_tpl/handler.py index 8dc2bb3..fbfaa05 100644 --- a/lib/cr_vmware_tpl/handler.py +++ b/lib/cr_vmware_tpl/handler.py @@ -891,6 +891,18 @@ class CrTplHandler(BaseHandler): cp /dev/null "${f}" fi done + + echo + echo "-----------------------------------------------------------" + echo "Current network configuration:" + echo + /usr/sbin/ip address show + echo + echo "Current routing configuration:" + echo + /usr/sbin/ip route show + echo + """).replace('@@@LOGFILES@@@', ' '.join(logfiles)) result = self.exec_remote(cmd) diff --git a/snippets/tpl.070.tweak_grub.sh b/snippets/tpl.070.tweak_grub.sh index 06b924a..fb27240 100644 --- a/snippets/tpl.070.tweak_grub.sh +++ b/snippets/tpl.070.tweak_grub.sh @@ -24,6 +24,14 @@ tweak_grub() { echo "Removing rhgb (RedHat Graphical Boot) from '${grub_cfg}' ..." sed --in-place -e 's/^\(GRUB_CMDLINE_LINUX=.*\)[ ]rhgb\(.*\)/\1\2/' "${grub_cfg}" + echo "Disabling IPv6 in '${grub_cfg}' ..." + sed --in-place -e 's/^\(GRUB_CMDLINE_LINUX=.*\)"$/\1 ipv6.disable=1"/' "${grub_cfg}" + + echo + echo "Current Linux command line in '${grub_cfg}':" + grep '^GRUB_CMDLINE_LINUX=' "${grub_cfg}" + echo + echo "Recreating /boot/grub2/grub.cfg ..." grub2-mkconfig -o /boot/grub2/grub.cfg