0

With some great help from another user on here I've managed to create a script which writes the necessary network configurations required to /etc/network/interfaces and allow public access to a DomU server.

I’ve placed this script in the /etc/rc.local file, and executed chmod u+x /etc/rc.local to enable it.

The server is a DomU Ubuntu server on the a host (Dom0). And rc.local doesn't seem to be executing before the network is brought up at boot/creation time.

So the configuration changes are being made to the /etc/network/interfaces file, but are not active once the boot process completes. I have to reboot once more before the changes take effect.

I've tried adding /etc/init.d/networking restart to the the end of the rc.local script (before exit 0), but with no joy.

I also tried adding the script to the S35networking file, but again without success.

Any advice or suggestions on getting this script to execute before the network device is brought up would be greatly appreciated.?

Colin
  • 21
  • 1
  • 5
  • So why don't you restart network service from your script itself ? I mean once configuration is changed, restart the network service and new configuration will be in effect. – Nehal Dattani Oct 09 '12 at 18:37
  • Hi. Yep. Tried that. I added `/etc/init.d/networking restart` to the script but it doesn't seem to work. :( – Colin Oct 09 '12 at 18:42
  • can you confirm this? "and executed chmod u+x /etc/rc.local to enable it." rc.local has already required perms. you nedd to make your script executable. – Nehal Dattani Oct 09 '12 at 18:43
  • Yes. I may not have been 100% clear. The script works once a second reboot takes place. But not on the very first boot once the DomU server is created. Hope that makes more sense? – Colin Oct 09 '12 at 18:46

0 Answers0