Use ifup/ifdown for redundant router

This commit is contained in:
Sheng Yang 2011-08-11 14:28:42 -07:00
parent b63b3fcf05
commit 95cc2d6381
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
ifconfig eth2 down
ifdown eth2
service dnsmasq stop

View File

@ -1,7 +1,7 @@
#!/bin/bash
ifconfig eth2 down && \
ifdown eth2 && \
ifconfig eth2 hw ether [ETH2MAC] && \
ifconfig eth2 up && \
ip route add 0/0 via [GATEWAY] && \
ifup eth2 && \
ip route add default via [GATEWAY] dev eth2 && \
service dnsmasq restart