Hi YaSTies, I'm looking for a nice solution to the following problem: I have to read and write simple ini files from a module, but I can not use SCR with an ini-agent, because the names and locations of the config files are not fixed. They are created on request and and have dynamic names. Even the number is variable. Yes, each config has to go to a separate file. Is there a nice solution to this other than to let my module create a new agent if I need a new one?? In the worst case I have to parse the files in ycp - but I'd prefer a more elegant solution. Thanks for any hint. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE Linux Products GmbH Research & Development Maxfeldstr. 5 GF: Markus Rex, HRB 16746 (AG Nürnberg) D-90409 Nürnberg -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 J. Daniel Schmidt wrote:
Hi YaSTies,
I'm looking for a nice solution to the following problem:
I have to read and write simple ini files from a module, but I can not use SCR with an ini-agent, because the names and locations of the config files are not fixed. They are created on request and and have dynamic names. Even the number is variable. Yes, each config has to go to a separate file.
Is there a nice solution to this other than to let my module create a new agent if I need a new one??
In the worst case I have to parse the files in ycp - but I'd prefer a more elegant solution.
Hi, This is pretty easy by SCR::RegisterAgent (...) function call. See function ReadServicesDefinedByRPMPackages() as an example in SuSEFirewallServices module: http://svn.opensuse.org/svn/yast/trunk/yast2/library/network/src/SuSEFirewal... - --- cut --- SCR::RegisterAgent ( // any path (should not be defined yet ;)) .firewall_service_definition, // here any other agent could be used `ag_ini (`SysConfigFile (filefullpath)) ); ... SCR::UnregisterAgent (.firewall_service_definition); - --- cut --- or just grep /usr/share/YaST/ directory for "SCR::RegisterAgent". Have a nice day :) Lukas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHVH9RVSqMdRCqTiwRAg7oAJ9HGiJo9thH1LTsXRLeMPpnrSctiwCeLVJL raUfh2Fm2YK137TVlWUmPzI= =ry91 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On Monday 03 December 2007, Lukas Ocilka wrote:
This is pretty easy by SCR::RegisterAgent (...) function call. See function ReadServicesDefinedByRPMPackages() as an example in SuSEFirewallServices module:
or just grep /usr/share/YaST/ directory for "SCR::RegisterAgent".
Cooool, thats what I need - thanks for the pointer. Now as I know the name I found it in our docs. Probably we should link this as well from the SCR description (tdg/Book-SCRDetails.html). Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE Linux Products GmbH Research & Development Maxfeldstr. 5 GF: Markus Rex, HRB 16746 (AG Nürnberg) D-90409 Nürnberg -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
J. Daniel Schmidt
-
Lukas Ocilka