This commit is contained in:
Jeffrey Serio 2024-11-24 05:42:40 -06:00
parent 04afc6e08f
commit 9feef98397

View File

@ -336,13 +336,13 @@ function disable_ipv6() {
else else
echo "IPv6 already disabled." echo "IPv6 already disabled."
fi fi
fi elif test -f /etc/redhat-release; then
if ! sudo grep "ipv6.disable=1" /boot/grub2/grub.cfg; then
if ! sudo grep "ipv6.disable=1" /boot/grub2/grub.cfg; then sudo grubby --args=ipv6.disable=1 --update-kernel=ALL
sudo grubby --args=ipv6.disable=1 --update-kernel=ALL sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grub2-mkconfig -o /boot/grub2/grub.cfg else
else echo "IPv6 already disabled."
echo "IPv6 already disabled." fi
fi fi
} }