mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-18 11:34:23 +01:00
We need to use ifup/ifdown to bring up the interfaces, because ifconfig don't know the ip of the interface after we modify cloud-early-config to avoid first start up of public interface. Reviewed-by: Edison
13 lines
234 B
Plaintext
13 lines
234 B
Plaintext
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
ip link|grep BROADCAST|grep -v eth0|grep -v eth1|cut -d ":" -f 2 > /tmp/iflist
|
|
while read i
|
|
do
|
|
ifdown $i
|
|
ifup $i
|
|
done < /tmp/iflist
|
|
ip route add default via [GATEWAY] dev eth2 && \
|
|
service dnsmasq restart
|