1
0
mirror of synced 2024-11-22 04:56:03 +03:00
This commit is contained in:
hwdsl2 2022-02-24 09:18:39 -06:00
parent 3d6b685e0b
commit 79a344ec46
2 changed files with 4 additions and 4 deletions

View File

@ -536,8 +536,8 @@ update_iptables() {
} }
apply_gcp_mtu_fix() { apply_gcp_mtu_fix() {
if dmidecode -s system-product-name 2>/dev/null | grep -q "Google Compute Engine" \ if dmidecode -s system-product-name 2>/dev/null | grep -qi 'Google Compute Engine' \
&& ifconfig 2>/dev/null | grep "$NET_IFACE" | head -n 1 | grep -q "mtu 1460"; then && ifconfig 2>/dev/null | grep "$NET_IFACE" | head -n 1 | grep -qi 'mtu 1460'; then
bigecho "Applying fix for MTU size..." bigecho "Applying fix for MTU size..."
ifconfig "$NET_IFACE" mtu 1500 ifconfig "$NET_IFACE" mtu 1500
dh_file="/etc/dhcp/dhclient.conf" dh_file="/etc/dhcp/dhclient.conf"

View File

@ -492,8 +492,8 @@ update_iptables() {
} }
apply_gcp_mtu_fix() { apply_gcp_mtu_fix() {
if dmidecode -s system-product-name 2>/dev/null | grep -q "Google Compute Engine" \ if dmidecode -s system-product-name 2>/dev/null | grep -qi 'Google Compute Engine' \
&& ifconfig 2>/dev/null | grep "$NET_IFACE" | head -n 1 | grep -q "mtu 1460"; then && ifconfig 2>/dev/null | grep "$NET_IFACE" | head -n 1 | grep -qi 'mtu 1460'; then
bigecho "Applying fix for MTU size..." bigecho "Applying fix for MTU size..."
ifconfig "$NET_IFACE" mtu 1500 ifconfig "$NET_IFACE" mtu 1500
dh_file="/etc/dhcp/dhclient.conf" dh_file="/etc/dhcp/dhclient.conf"