]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Disabling IPv6 in GRUB
authorFrank Brehm <frank@brehm-online.com>
Mon, 4 Apr 2022 07:33:36 +0000 (09:33 +0200)
committerFrank Brehm <frank@brehm-online.com>
Mon, 4 Apr 2022 07:33:36 +0000 (09:33 +0200)
lib/cr_vmware_tpl/handler.py
snippets/tpl.070.tweak_grub.sh

index 8dc2bb325dc0d70767be0114cd0dc9ea2cb177d0..fbfaa05de0b3dd798627a22ee76bb5f04baaed23 100644 (file)
@@ -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)
index 06b924af7dbcd7afc296f47ed130968a58763cea..fb27240534aaa413ea3e5fac53beb9b3ae92733a 100644 (file)
@@ -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