[yast-commit] r67341 - in /trunk/iscsi-client: package/yast2-iscsi-client.changes src/IscsiClientLib.ycp
Author: fehr Date: Wed Feb 1 19:31:58 2012 New Revision: 67341 URL: http://svn.opensuse.org/viewcvs/yast?rev=67341&view=rev Log: create /etc/iscsi to prevent crash if nonexistant (bnc#742570) Modified: trunk/iscsi-client/package/yast2-iscsi-client.changes trunk/iscsi-client/src/IscsiClientLib.ycp Modified: trunk/iscsi-client/package/yast2-iscsi-client.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/package/yast2-iscsi-client.changes?rev=67341&r1=67340&r2=67341&view=diff ============================================================================== --- trunk/iscsi-client/package/yast2-iscsi-client.changes (original) +++ trunk/iscsi-client/package/yast2-iscsi-client.changes Wed Feb 1 19:31:58 2012 @@ -1,6 +1,7 @@ ------------------------------------------------------------------- Mon Jan 30 19:14:16 CET 2012 - fehr@suse.de +- create /etc/iscsi to prevent crash if nonexistant (bnc#742570) - prevent calling getiBFT() before open-iscsi install (bnc#725833) ------------------------------------------------------------------- Modified: trunk/iscsi-client/src/IscsiClientLib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/iscsi-client/src/IscsiClientLib.ycp?rev=67341&r1=67340&r2=67341&view=diff ============================================================================== --- trunk/iscsi-client/src/IscsiClientLib.ycp (original) +++ trunk/iscsi-client/src/IscsiClientLib.ycp Wed Feb 1 19:31:58 2012 @@ -321,6 +321,12 @@ global boolean writeInitiatorName(string new_value){ boolean ret=true; string file="/etc/iscsi/initiatorname.iscsi"; + string dir="/etc/iscsi"; + if( (map)SCR::Read (.target.stat, dir )==$[] ) + { + SCR::Execute(.target.mkdir, dir ); + y2milestone( "writeInitiatorName dir:%1", SCR::Read(.target.stat, dir )); + } if ( ((map<string, any>)SCR::Read (.target.lstat, file))["size"]:0>0 ) { y2milestone("%1 file exists, create backup", file); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn2.opensuse.org