4
3
I want to modify a file like /etc/gdm/custom.conf
from the shell or a script.
# GDM configuration storage
[xdmcp]
[debug]
[daemon]
AutomaticLoginEnable=true;
AutomaticLogin=username;
But the idea is that I can add a line to a section and it check if the section is defined, (add the definition if not), the property is defined, let it undefine (erase the line), (and delete the section header if there is no property defined), etc...
I didn't find anything except gconftool-2 but it do not explain how to modify other files. (there is a shema file there).
8
conf
files do not have a fixed markup of any kind. Compare f.e. the/etc/gdm/custom.conf
to/etc/X11/xorg.conf
or/etc/resolv.conf
. – Bobby – 2010-06-22T17:22:17.603as bobby states there is no such thing as .conf syntax but lots of scripting languages do have good config parser modules. you may achive what you are looking for with a short self written script. e.g. in python or perl – matthias krull – 2010-06-23T15:39:47.250