Author Topic: ifconfig broken after reboot  (Read 3887 times)

Bzh7000

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
ifconfig broken after reboot
« on: November 29, 2010, 01:50:12 pm »
Hello,

I have a problem with my configuration under Esxi

Written with this help guide http://guides.ovh.com/BridgeClient

nano /etc/network/interfaces :

auto lo eth1
iface lo inet loopback
iface eth1 inet static

address 178.xx.xx.x1
netmask 255.255.255.255
broadcast 178.xx.xx.x1
post-up route add 91.xxx.xxx.254 dev eth1
post-up route add default gw 91.xxx.xxx.254
post-down route del 91.xxx.xxx.254 dev eth1
post-down route del default gw 91.xxx.xxx.254


nano /etc/resolv.conf :

nameserver 213.186.33.99

It was ok but after restart the VM, This configuration is lost.

Do someone know why please ?

« Last Edit: November 29, 2010, 01:52:20 pm by Bzh7000 »

Sam Graf

  • Guest
Re: ifconfig broken after reboot
« Reply #1 on: November 29, 2010, 05:20:53 pm »
Zentyal uses Mason templates to write out configuration files for all services managed by Zentyal. Manual changes to configuration files can be lost on service or machine restart.

There are a couple of ways to make manual changes "stick." As mentioned in the linked document above, it is possible to edit the template files themselves. It is also possible to use Zentyal's hooks system.


Bzh7000

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: ifconfig broken after reboot
« Reply #2 on: November 30, 2010, 03:14:25 pm »
Thank you for this answer. It's a first step to resolv my problem.
Do you have the official way to Inactive the template.

In this help guide :
"To modify a template, you will need first to find it.
Templates live under the directory "/usr/share/ebox/stubs/[module name]",
normally they have the same name than the configuration file with the extension ".mas" appended to it."


What is the name of the module for : etc/network/interfaces ,  please ?
And what writting in it ?

I found in  /usr/share/ebox/stubs/network/ :
chap-secrets.mas
ddclient.mas
dsl-provider.mas
pap-secrets.mas
rt-tables.mas
ddclient.conf.mas
dhclient.conf.mas
jnettop.conf.mas
resolv.conf.mas

I opened all of them, but I'm beguining in linux . So ....
Thanks for help
« Last Edit: December 01, 2010, 12:04:36 pm by Bzh7000 »

Bzh7000

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: ifconfig broken after reboot
« Reply #3 on: December 02, 2010, 11:37:56 pm »
Well, I think the this link is a good way :
/usr/share/ebox/templates/network/confirm.mas
But I don't know what modify in it to accept my IP configuration
Maybe simply delete it ?   ;)

Do someone know it ?
thx

Bzh7000

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: ifconfig broken after reboot
« Reply #4 on: December 03, 2010, 06:43:42 am »
How closing this post please ? I have yet another same question in run on the forum.
Thanks

Josep

  • Zen Samurai
  • ****
  • Posts: 255
  • Karma: +6/-0
    • View Profile
Re: ifconfig broken after reboot
« Reply #5 on: December 05, 2010, 01:47:10 am »
/etc/network/interfaces is a file that is not generated with mason templates, but directly by a procedure "generateInterfaces" in file /usr/share/perl5/EBox/Network.pm.
If you want to make any changes that persist, you will have to modify that procedure or try using hooks and create a script named /etc/ebox/hooks/network.postsetconf that modifies the file /etc/network/interfaces.

Bzh7000

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: ifconfig broken after reboot
« Reply #6 on: December 06, 2010, 09:58:53 am »
Hello,
For the moment, My productiv VM are running but I dont know what the technical service made for it.
I'm waiting for their answer.

I'll try your solution on my test VM and tell you the result.
Thank you