-----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