Author: gs
Date: Wed Sep 28 13:28:57 2011
New Revision: 66106
URL: http://svn.opensuse.org/viewcvs/yast?rev=66106&view=rev
Log:
better name for agent
Modified:
branches/SuSE-Code-11-SP2-Branch/fcoe-client/agents/fcoe_config.scr
branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/agents/fcoe_config.scr
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/agents/fcoe_config.scr?rev=66106&r1=66105&r2=66106&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/agents/fcoe_config.scr (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/agents/fcoe_config.scr Wed Sep 28 13:28:57 2011
@@ -3,26 +3,23 @@
* fcoe_config.scr
* Summary:
* SCR Agent for reading/writing /etc/fcoe/config
- * using the ini-agent
+ * using the sysconfig agent
* Access:
* read/write
* Authors:
* Gabriele Mohr
- * See:
- * yast2-agent-ini/ini.html
- * libscr
* Example:
* Read(.fcoe.config.USE_SYSLOG)
* ("yes")
**
- * Write(.fcoe.cfg-ethx.USE_SYSLOG, "no")
+ * Write(.fcoe.config.USE_SYSLOG, "no")
* (true)
*
*
* Read/Sets the values defined in <tt>/etc/fcoe/config</tt>
* in an easy manner.
*/
-.fcoe
+.fcoe.config
`ag_ini(
`SysConfigFile("/etc/fcoe/config")
Modified: branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp?rev=66106&r1=66105&r2=66106&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/fcoe-client/src/FcoeClient.ycp Wed Sep 28 13:28:57 2011
@@ -445,6 +445,9 @@
content = (string)SCR::Read(.target.string, file_name);
}
+ // foreach( string var, values, {
+ // SCR::Read(.fcoe.cfg-ethx.value + vlan_device_name + var);
+ // });
if ( content != "" )
{
list <string> lines = splitstring( content, "\n" );
@@ -719,16 +722,16 @@
//
global boolean ReadFcoeConfig()
{
- list <string> options = (list<string>) SCR::Dir(.fcoe);
+ list <string> options = (list<string>) SCR::Dir(.fcoe.config);
y2milestone( "List of options in /etc/fcoe/config: %1", options );
if ( options == [] || options == nil )
return false;
- string debug_val = (string)SCR::Read(add(.fcoe, "DEBUG"));
+ string debug_val = (string)SCR::Read(add(.fcoe.config, "DEBUG"));
fcoe_general_config = add( fcoe_general_config, "DEBUG", debug_val );
- string syslog_val = (string)SCR::Read(add(.fcoe, "USE_SYSLOG"));
+ string syslog_val = (string)SCR::Read(add(.fcoe.config, "USE_SYSLOG"));
fcoe_general_config = add( fcoe_general_config, "USE_SYSLOG", syslog_val );
y2milestone( "/etc/fcoe/config read: DEBUG: %1, USE_SYSLOG: %2", debug_val, syslog_val );
@@ -743,16 +746,16 @@
{
boolean ret = true;
- boolean success = (boolean)SCR::Write(add(.fcoe, "DEBUG"), GetFcoeConfig()["DEBUG"]:"" );
+ boolean success = (boolean)SCR::Write(add(.fcoe.config, "DEBUG"), GetFcoeConfig()["DEBUG"]:"" );
if ( !success )
ret = false;
- success = (boolean)SCR::Write(add(.fcoe, "USE_SYSLOG"), GetFcoeConfig()["USE_SYSLOG"]:"" );
+ success = (boolean)SCR::Write(add(.fcoe.config, "USE_SYSLOG"), GetFcoeConfig()["USE_SYSLOG"]:"" );
if ( !success )
ret = false;
// This is very important- it flushes the cache, and stores the configuration on the disk
- SCR::Write(.fcoe, nil);
+ SCR::Write(.fcoe.config, nil);
return ret;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org