Ifdown may not bring interface down if ifup not run

Use ifconfig to bring it down
This commit is contained in:
Sheng Yang 2011-08-11 14:59:51 -07:00
parent 7807e29c30
commit 258a1bc451
2 changed files with 2 additions and 0 deletions

View File

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

View File

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