views:

20

answers:

1

I'm building a custom package of vnc and would like to ensure the xdcmp settings of GDM are enabled in the package post install script. The gdm.conf file is an ini style one, i.e.:

[section]
var=name

And the value I want to set has name clashes in different sections throughout the config file. Are there any tools that allow for easy manipulation of ini style config files from shell scripts? I'd like to sort this out in the .deb postinst script.

+1  A: 

If you're willing to write some Perl, there's Config::IniFiles (package libconfig-inifiles-perl).

Gilles
I'm coming to conclusion that perl is the easiest solution. The Debian packaging guidelines don't seem to disallow perl for configure scripts although I suspect adding a dependency on perl just to install a package will mean this will never go upstream.
stsquad
@stsquad: Perl itself is not a problem, it's officially blessed for use in Debian package scripts (and you can see for example that `perl-base` is essential, and `debconf` provides Perl modules). Having to pre-depend on `libconfig-inifiles-perl` might be a bigger obstable.
Gilles