[yast-commit] r63961 - /trunk/fcoe-client/src/FcoeClient.ycp
Author: gs Date: Wed May 11 14:46:51 2011 New Revision: 63961 URL: http://svn.opensuse.org/viewcvs/yast?rev=63961&view=rev Log: WriteFcoeConfig Modified: trunk/fcoe-client/src/FcoeClient.ycp Modified: trunk/fcoe-client/src/FcoeClient.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fcoe-client/src/FcoeClient.ycp?rev=63961&r1=63960&r2=63961&view=diff ============================================================================== --- trunk/fcoe-client/src/FcoeClient.ycp (original) +++ trunk/fcoe-client/src/FcoeClient.ycp Wed May 11 14:46:51 2011 @@ -596,7 +596,25 @@ { return redo_list; } + +boolean WriteFcoeConfig() +{ + boolean ret = true; + boolean success = (boolean)SCR::Write(add(.fcoe, "DEBUG"), GetFcoeConfig()["DEBUG"]:"" ); + if ( !success ) + ret = false; + + success = (boolean)SCR::Write(add(.fcoe, "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); + + return ret; +} + /** * Read all fcoe-client settings * @return true on success @@ -732,8 +750,10 @@ if(Abort()) return false; Progress::NextStage(); + boolean success = WriteFcoeConfig(); + /* Error message */ - if(false) Report::Error (_("Cannot write settings.")); + if( !success ) Report::Error (_("Cannot write settings to /etc/fcoe/config.")); sleep(sl); // run SuSEconfig -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn2.opensuse.org