Mailinglist Archive: yast-devel (77 mails)

< Previous Next >
[yast-devel] manipulating multi-section configuration files
  • From: David Bolt <bcrafhfr-lnfg-qriry@xxxxxxxxxx>
  • Date: Wed, 21 Jan 2009 09:32:04 +0000
  • Message-id: <V2h32c6UuudJFwWv@xxxxxxxxxxxxxxxxxxx>
I have a configuration file with sections to it, an example of it is
something like this:

<snippet of configuration file>

[rc5-72]
fetch-workunit-threshold=0
fetch-time-threshold=0

[ogr_p2]
fetch-workunit-threshold=0
fetch-time-threshold=24
preferred-blocksize=0

[triggers]
restart-on-config-file-change=yes
pause-on-no-mains-power=yes

[display]
progress-indicator=auto-sense
detached=no

[processor-usage]
priority=0
max-threads=-1

</snippet>

and want to know if it's possible to read and write the individual
sections, especially where there are options with the same names in
different sections. If it is possible, are there any examples available
to work with?

Using the simple example at:

<URL:http://en.opensuse.org/YaST/Tutorials/QuickModule>

I was able to read and write a straight forward configuration file, but
this creates invalid files where there are multiple sections. I just
need to figure out how to figure out how to modify the individual parts
of the file.


Regards,
David Bolt

--
Team Acorn: http://www.distributed.net/ OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
| openSUSE 10.3 32b | openSUSE 11.0 32b |
openSUSE 10.2 64b | openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b
TOS 4.02 | openSUSE 10.3 PPC | RISC OS 3.6 | RISC OS 3.11
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups