hercules-team / augeas

A configuration editing tool and API
http://augeas.net/
GNU Lesser General Public License v2.1
486 stars 199 forks source link

after updating from 1.12.0 to 1.14.1 sysctl.lns broken for OpenBSD #822

Open buzzdeee opened 10 months ago

buzzdeee commented 10 months ago

using Puppet to manage sysctls, with augeas-1.14.1 on OpenBSD, it creates /etc/sysctl.conf files with spaces around the = sign alike:

net.inet.ip.forwarding = 1
net.inet6.ip6.forwarding = 1

which breaks applying sysctls on (re-)boot via /etc/rc, as it doesn't expect, and handle these spaces well.

Before the update, there was no space around the = signs.

net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1

to exclude Puppet as eventual trouble maker, test manually with augtool to update /etc/sysctl.conf

georgehansper commented 10 months ago

Hello Sebastian,

I have tested the Sysctl lens behaviour on both versions 1.12.0 and 1.14.1, and both behave the same way under augtool

Can I ask you to check which version of Augeas you are moving from? It may be a version earlier than 1.12.0

Given that the existing behaviour has been around for a while, I think changing it now will cause more problems than it solves.

Can I suggest a possible solution to the problem affecting the /etc/rc file might be to use an different lens, such as Simplelines Simplelines will let you define the contents of a whole line of text at a time, giving you control of the spacing used.

The puppet type "augeas" allows you to specify the lens, overriding the default lens (Sysctl) which is associated with the file /etc/sysctl.conf