mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
bug #2781: work around bug in Ubuntu Precise where restarting network does not work
Signed-off-by: Javi Fontan <jfontan@opennebula.org>
This commit is contained in:
parent
36d1695af6
commit
47dafb19e7
@ -166,13 +166,25 @@ EOT
|
||||
configure_network()
|
||||
{
|
||||
gen_network_configuration > /etc/network/interfaces
|
||||
}
|
||||
|
||||
service networking stop
|
||||
sleep 1
|
||||
service networking start
|
||||
activate_network()
|
||||
{
|
||||
if [[ `lsb_release -c | awk '{print($2)}'` = precise ]]; then
|
||||
IFACES=`get_interfaces`
|
||||
|
||||
for i in $IFACES; do
|
||||
DEV=`get_dev $i`
|
||||
service network-interface restart INTERFACE=$DEV
|
||||
done
|
||||
else
|
||||
service networking stop
|
||||
sleep 1
|
||||
service networking start
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
}
|
||||
|
||||
configure_network
|
||||
|
||||
activate_network
|
||||
|
Loading…
x
Reference in New Issue
Block a user