1

I am using Linode and every single time I boot my server, Linode (cloud provider) ovewrites the file below:

/etc/sysconfig/network-scripts/ifcfg-eth0

This is well documented and expected in order to keep the network interface working as expected. However sometimes I need to add configurations to this file and (of course) they are lost at next boot time. For example: I need to add the line below in the file:

ZONE="my_custom_zone"

And everytime my linode gets booted, this line is removed. So I am wondering: do you know any other place that I can insert this line to allow NetworkManager to read it everytime I boot my server? Is there somewhere else where I can insert the "eth0" (interface network name) configuration which works exactyl as if I had inserted in the file above?

Jonathan
  • 11
  • 1

1 Answers1

0

Not really. NetworkManager profiles are one unity of settings, you cannot define parts (the zone) somewhere else.

Exceptions are, that some properties support "global connection defaults" which can be configured in NetworkManager.conf, as documented in man NetworkManager.conf. However, that does not work for the zone.

You can clone the profile and use that one instead (nmcli connection clone OLD NEW). The problem is, if the old profile changes, you'll miss those changes.

Otherwise, maybe have another service running after ifcfg-eth0 gets rewritten, to update the profile once again. I'd guess, this is done by a systemd service, so you could add your script After= that.

thaller
  • 159
  • 1