Skip to content

Commit

Permalink
fix: skip adding dummy route if a default one exists
Browse files Browse the repository at this point in the history
Signed-off-by: Zespre Chang <[email protected]>
(cherry picked from commit 35b511c)
  • Loading branch information
starbops authored and mergify[bot] committed Mar 5, 2025
1 parent b4652fb commit 0ba6124
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion package/harvester-os/files/usr/sbin/harv-dummy-iface
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash -ex

if ip route show | grep -q '^default'; then
exit 0
fi

ip link add type dummy
ip addr add 192.168.1.100/255.255.255.0 dev dummy0
ip link set dummy0 up
ip route add default via 192.168.1.100
ip route add default via 192.168.1.100

0 comments on commit 0ba6124

Please sign in to comment.