fix: handle missing ip command in MTU setup
Update README Actions Table / update-readme (push) Successful in 3s

This commit is contained in:
2026-06-13 09:58:48 -07:00
parent 0a0511c27a
commit f3f0a8e4b1
+11
View File
@@ -20,6 +20,16 @@ runs:
- name: Fix MTU size for Proxmox/Docker network compatibility - name: Fix MTU size for Proxmox/Docker network compatibility
shell: bash shell: bash
run: | run: |
if ! command -v ip &> /dev/null; then
if command -v apt-get &> /dev/null && [ "$(id -u)" -eq 0 ]; then
echo "ip command not found. Installing iproute2..."
apt-get update -qy && apt-get install -qy iproute2 || true
else
echo "ip command not found and cannot install. Skipping MTU configuration."
fi
fi
if command -v ip &> /dev/null; then
DEFAULT_INTERFACE=$(ip route show | grep default | awk '{print $5}') DEFAULT_INTERFACE=$(ip route show | grep default | awk '{print $5}')
if [ -n "$DEFAULT_INTERFACE" ]; then if [ -n "$DEFAULT_INTERFACE" ]; then
echo "Setting MTU of $DEFAULT_INTERFACE to 1400..." echo "Setting MTU of $DEFAULT_INTERFACE to 1400..."
@@ -29,6 +39,7 @@ runs:
sudo ip link set dev "$DEFAULT_INTERFACE" mtu 1400 || true sudo ip link set dev "$DEFAULT_INTERFACE" mtu 1400 || true
fi fi
fi fi
fi
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v4 uses: actions/setup-node@v4