<div dir="ltr">Hi Stefan,<div><br></div><div>thanks a lot for the contribution!</div><div><br></div><div>I think we need to rewrite a small thing in the patch. As far as I can tell, the $DEV variable is not defined in that function so it's only executing the service network-interface restart once. If you have multiple ifaces, it will only restart one.</div>
<div><br></div><div>I'm happy to rewrite it, but it would be cool if you could send a pull request from Github, so the patch is authored by you.</div><div><br></div><div>Cheers,<br>Jaime</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Mar 12, 2014 at 6:20 PM, Stefan Kooman <span dir="ltr"><<a href="mailto:stefan@bit.nl" target="_blank">stefan@bit.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
For those of you using Ubuntu Precise, contextualized images and<br>
contextualized networking: the networking script is not working because<br>
of a bug in Ubuntu. The "service networking $action" does not work :(. The<br>
network interfaces file is created succesfully, so after a reboot of the<br>
vm, networking will be set up correctly. To fix this you might apply the<br>
following patch:<br>
<br>
--- /root/00-network 2014-03-12 15:06:21.852446011 +0100<br>
+++ /etc/one-context.d/00-network 2014-03-12 18:15:03.797977027 +0100<br>
@@ -167,9 +167,15 @@<br>
{<br>
gen_network_configuration > /etc/network/interfaces<br>
<br>
- service networking stop<br>
- sleep 1<br>
- service networking start<br>
+ if<br>
+ [[ `lsb_release -c | awk '{print($2)}'` = precise ]]<br>
+ then<br>
+ service network-interface restart INTERFACE=$DEV<br>
+ else<br>
+ service networking stop<br>
+ sleep 1<br>
+ service networking start<br>
+ fi<br>
<br>
sleep 2<br>
}<br>
<br>
Gr. Stefan<br>
<br>
[1]: <a href="https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/663352" target="_blank">https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/663352</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
| BIT BV <a href="http://www.bit.nl/" target="_blank">http://www.bit.nl/</a> Kamer van Koophandel 09090351<br>
| GPG: 0xD14839C6 <a href="tel:%2B31%20318%20648%20688" value="+31318648688">+31 318 648 688</a> / <a href="mailto:info@bit.nl">info@bit.nl</a><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</font></span></blockquote></div><br></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Jaime Melis<br>Project Engineer<br>OpenNebula - Flexible Enterprise Cloud Made Simple<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a></div>
</div>