Created
July 2, 2017 06:11
-
-
Save oilbeater/614801f428391a7b67ae422fbf5f65b6 to your computer and use it in GitHub Desktop.
Modify calico route rules.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
address=`ifconfig bond0 | grep inet | grep -v inet6|awk '{print $2}'` | |
echo $address | |
ip route | grep cali | grep -v src | while read -r line ; | |
do | |
ip route replace $line src $address | |
done | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment