[yast-commit] r55331 - in /branches/SuSE-Code-11-Branch/reipl: VERSION package/yast2-reipl.changes src/Reipl.ycp src/inst_reiplauto.ycp src/reipl_bootloader_finish.ycp src/reipl_finish.ycp
Author: jsrain Date: Mon Feb 9 10:57:00 2009 New Revision: 55331 URL: http://svn.opensuse.org/viewcvs/yast?rev=55331&view=rev Log: reverted last patch (different one submitted to autobuild by Hannes) Modified: branches/SuSE-Code-11-Branch/reipl/VERSION branches/SuSE-Code-11-Branch/reipl/package/yast2-reipl.changes branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp branches/SuSE-Code-11-Branch/reipl/src/inst_reiplauto.ycp branches/SuSE-Code-11-Branch/reipl/src/reipl_bootloader_finish.ycp branches/SuSE-Code-11-Branch/reipl/src/reipl_finish.ycp Modified: branches/SuSE-Code-11-Branch/reipl/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/VERSION?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/VERSION (original) +++ branches/SuSE-Code-11-Branch/reipl/VERSION Mon Feb 9 10:57:00 2009 @@ -1 +1 @@ -2.17.4 +2.17.3 Modified: branches/SuSE-Code-11-Branch/reipl/package/yast2-reipl.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/package/yast2-reipl.changes?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/package/yast2-reipl.changes (original) +++ branches/SuSE-Code-11-Branch/reipl/package/yast2-reipl.changes Mon Feb 9 10:57:00 2009 @@ -1,10 +1,4 @@ ------------------------------------------------------------------- -Mon Feb 9 09:48:24 CET 2009 - jsrain@suse.cz - -- more rebooting fixes from IBM (bnc #471522) -- 2.17.4 - -------------------------------------------------------------------- Fri Feb 6 11:28:36 CET 2009 - jsrain@suse.cz - fixed rebooting (bnc #471522) Modified: branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp (original) +++ branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp Mon Feb 9 10:57:00 2009 @@ -137,8 +137,7 @@ // "method": "ccw", // "ccw": $[ // "device": "0.0.4711", -// "loadparm": "", -// "parm": "" /* SLES 11 and z/VM only */ +// "loadparm": "" // ], // "fcp": $[ // "device": "0.0.4711", @@ -185,7 +184,6 @@ y2error ("Missing loadparm under %1", ccw_directory); return false; } - // don't check for "parm" since it might not be there under zLPAR } if (fcp_exists) { @@ -365,13 +363,12 @@ } /** - * Returns the reipl configuration passed in with what it should be for the detected + * Modifys the reipl configuration passed in with what it should be for the detected * boot partition. - * @param configuration an old configuration. - * @return a map of the new target configuration. + * @param configuration the current configuration. + * @return a map of the new configuration. */ global map <string, any> ModifyReiplWithBootPartition (map <string, any> configuration) { - // get target information list<string> uParts = FindBootPartition (); if (uParts == nil) { @@ -383,7 +380,12 @@ if (size (uParts) == 2) { if (uParts[0]:"" == "ccw") { + if (ccw_exists) { fCCW = true; + } + else { + y2error ("ModifyReiplWithBootPartition: udevPath uses ccw but ccw is not implemented!"); + } } else { y2error ("ModifyReiplWithBootPartition: size of uParts is 2, but first word is not ccw!"); @@ -391,7 +393,12 @@ } else if (size (uParts) == 4) { if (uParts[0]:"" == "zfcp") { + if (fcp_exists) { fFCP = true; + } + else { + y2error ("ModifyReiplWithBootPartition: udevPath uses fcp but fcp is not implemented!"); + } } else { y2error ("ModifyReiplWithBootPartition: size of uParts is 4, but format is not what we expect"); @@ -401,29 +408,45 @@ y2error ("ModifyReiplWithBootPartition: size of uParts is not 2 or 4"); } - // overwrite parts of configuration map with target values if (fCCW) { configuration["method"] = "ccw"; map ccw_map = (map)configuration["ccw"]:nil; + + if (ccw_map == nil) { + y2error ("ModifyReiplWithBootPartition: ccw does not exist in configuration"); + + configuration = nil; + } + else { ccw_map["device"] = uParts[1]:""; ccw_map["loadparm"] = ""; - //ccw_map["parm"] = ""; /* SLES 11 and z/VM only */ // read only + configuration["ccw"] = ccw_map; - y2milestone ("ModifyReiplWithBootPartition: modified ccw map"); + } } else if (fFCP) { configuration["method"] = "fcp"; map fcp_map = (map)configuration["fcp"]:nil; + + if (fcp_map == nil) { + y2error ("ModifyReiplWithBootPartition: ccw does not exist in configuration"); + + configuration = nil; + } + else { fcp_map["device"] = uParts[1]:""; fcp_map["wwpn"] = uParts[2]:""; fcp_map["lun"] = uParts[3]:""; - fcp_map["bootprog"] = "0"; - fcp_map["br_lba"] = "0"; + fcp_map["bootprog"] = ""; + fcp_map["br_lba"] = ""; + configuration["fcp"] = fcp_map; - y2milestone ("ModifyReiplWithBootPartition: modified fcp map"); + } } else { - y2error ("ModifyReiplWithBootPartition: Should not be here, configuration unmodified!"); + y2error ("ModifyReiplWithBootPartition: Should not be here!"); + + configuration = nil; } return configuration; @@ -435,44 +458,50 @@ */ global map <string, any> ReadState () { map <string, any> configuration = $[]; - configuration["ccw"] = $[ - "device": "", - "loadparm": "", - "parm": "" /* SLES 11 and z/VM only */ - ]; - configuration["fcp"] = $[ - "device": "", - "wwpn": "", - "lun": "", - "bootprog": "", - "br_lba": "" - ]; if (!SanityCheck ()) { y2error ("Reipl::Read: SanityCheck failed!"); - // Popup::Error (_("This machine does not support reipl!")); + /* Popup::Error (_("This machine does not support reipl!")); */ /* Don't bother the user, just silently do shutdown in the end. Especially, since this would currently popup three times during installation. */ - return configuration; + return nil; } if (ccw_exists) { + if (configuration["ccw"]:nil == nil) { + configuration["ccw"] = $[ + "device": "", + "loadparm": "" + ]; + } + map ccw_map = (map)configuration["ccw"]:nil; ccw_map["device"] = deletechars ((string)SCR::Read (.target.string, ccw_directory + "/device"), "\n\r"); ccw_map["loadparm"] = deletechars ((string)SCR::Read (.target.string, ccw_directory + "/loadparm"), "\n\r"); - ccw_map["parm"] = deletechars ((string)SCR::Read (.target.string, ccw_directory + "/parm"), "\n\r"); /* SLES 11 and z/VM only */ configuration["ccw"] = ccw_map; } else { - y2warning ("Reipl::Read: ccw is not configured."); + y2error ("Reipl::Read: ccw is not configured."); + + configuration["ccw"] = nil; } if (fcp_exists) { + if (configuration["fcp"]:nil == nil) { + configuration["fcp"] = $[ + "device": "", + "wwpn": "", + "lun": "", + "bootprog": "", + "br_lba": "" + ]; + } + map fcp_map = (map)configuration["fcp"]:nil; fcp_map["device"] = deletechars ((string)SCR::Read (.target.string, fcp_directory + "/device"), "\n\r"); @@ -484,7 +513,7 @@ configuration["fcp"] = fcp_map; } else { - y2warning ("Reipl::Read: fcp is not configured."); + configuration["fcp"] = nil; } configuration["method"] = deletechars ((string)SCR::Read (.target.string, reipl_directory + "/reipl_type"), "\n\r"); @@ -521,6 +550,11 @@ y2milestone ("Reipl::WriteState: writing out method %1", configuration["method"]:""); SCR::Write (.target.string, reipl_directory + "/reipl_type", (string)configuration["method"]:nil); + /* + I see a difference between the value written to the log and written to sysfs: + configuration["method"]:"" <===> (string)configuration["method"]:nil + But that's probably OK here and not the reason for the obvious bug in the y2log. + */ } if (ccw_exists) { @@ -556,7 +590,6 @@ rc = false; } - } else { y2error ("Reipl::WriteState: ccw_map is nil!"); @@ -662,8 +695,7 @@ map ccwIn = (map)settings["ccw"]:$[]; map ccwOut = $[ "device": "", - "loadparm": "", - "parm": "" /* SLES 11 and z/VM only */ + "loadparm": "" ]; if (ccwIn["device"]:nil != nil) { @@ -672,10 +704,6 @@ if (ccwIn["loadparm"]:nil != nil) { ccwOut["loadparm"] = ccwIn["loadparm"]:nil; } - /* SLES 11 and z/VM only */ - if (ccwIn["parm"]:nil != nil) { - ccwOut["parm"] = ccwIn["parm"]:nil; - } imported["ccw"] = ccwOut; } Modified: branches/SuSE-Code-11-Branch/reipl/src/inst_reiplauto.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/src/inst_reiplauto.ycp?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/src/inst_reiplauto.ycp (original) +++ branches/SuSE-Code-11-Branch/reipl/src/inst_reiplauto.ycp Mon Feb 9 10:57:00 2009 @@ -65,13 +65,14 @@ boolean rc = true; - map <string, any> configuration = Reipl::ReadState (); + map <string, any> oldConfiguration = Reipl::ReadState (); + map <string, any> newConfiguration = nil; - if (configuration != nil) { - configuration = Reipl::ModifyReiplWithBootPartition (configuration); + if (oldConfiguration != nil) { + newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration); - if (configuration != nil) { - Reipl::WriteState (configuration); + if (newConfiguration != nil) { + Reipl::WriteState (newConfiguration); } else { y2error ("Could not modify reipl configuration"); Modified: branches/SuSE-Code-11-Branch/reipl/src/reipl_bootloader_finish.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/src/reipl_bootloader_finish.ycp?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/src/reipl_bootloader_finish.ycp (original) +++ branches/SuSE-Code-11-Branch/reipl/src/reipl_bootloader_finish.ycp Mon Feb 9 10:57:00 2009 @@ -20,58 +20,42 @@ textdomain "reipl"; - boolean different = true; + boolean different = false; string ipl_msg = ""; // Other architectures do not support it if (Arch::s390 ()) { map <string, any> oldConfiguration = Reipl::ReadState (); - map <string, any> newConfiguration = Reipl::ReadState (); + map <string, any> newConfiguration = oldConfiguration; if (oldConfiguration != nil) { - newConfiguration = Reipl::ModifyReiplWithBootPartition (newConfiguration); + newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration); map oldCcwMap = (map)oldConfiguration["ccw"]:nil; map newCcwMap = (map)newConfiguration["ccw"]:nil; map oldFcpMap = (map)oldConfiguration["fcp"]:nil; map newFcpMap = (map)newConfiguration["fcp"]:nil; - different = (oldConfiguration["method"]:"a" != newConfiguration["method"]:"b") - || (oldCcwMap["device"]:"a" != newCcwMap["device"]:"b") - || (oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b") - || (oldCcwMap["parm"]:"a" != newCcwMap["parm"]:"b") - || (oldFcpMap["device"]:"a" != newFcpMap["device"]:"b") - || (oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b") - || (oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b") - || (oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b") - || (oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b"); - - y2milestone("(oldConfiguration['method']:'a' != newConfiguration['method']:'b') = %1", (oldConfiguration["method"]:"a" != newConfiguration["method"]:"b")); - y2milestone("(oldCcwMap['device']:'a' != newCcwMap['device']:'b') = %1", (oldCcwMap["device"]:"a" != newCcwMap["device"]:"b")); - y2milestone("(oldCcwMap['loadparm']:'a' != newCcwMap['loadparm']:'b') = %1", (oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b")); - y2milestone("(oldCcwMap['parm']:'a' != newCcwMap['parm']:'b') = %1", (oldCcwMap["parm"]:"a" != newCcwMap["parm"]:"b")); - y2milestone("(oldFcpMap['device']:'a' != newFcpMap['device']:'b') = %1", (oldFcpMap["device"]:"a" != newFcpMap["device"]:"b")); - y2milestone("(oldFcpMap['wwpn']:'a' != newFcpMap['wwpn']:'b') = %1", (oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b")); - y2milestone("(oldFcpMap['lun']:'a' != newFcpMap['lun']:'b') = %1", (oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b")); - y2milestone("(oldFcpMap['bootprog']:'a' != newFcpMap['bootprog']:'b') = %1", (oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b")); - y2milestone("(oldFcpMap['br_lba']:'a' != newFcpMap['br_lba']:'b') = %1", (oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b")); - y2milestone("different = %1", different); + different = oldConfiguration["method"]:"a" != newConfiguration["method"]:"b" + && oldCcwMap["device"]:"a" != newCcwMap["device"]:"b" + && oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b" + && oldFcpMap["device"]:"a" != newFcpMap["device"]:"b" + && oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b" + && oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b" + && oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b" + && oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b"; - y2milestone("newConfiguration['method'] : %1", newConfiguration["method"]:"ERROR"); if (newConfiguration["method"]:"ERROR" == "ccw") { - y2milestone("making ccw ipl text"); string dev = substring (newCcwMap["device"]:"", 4, 4); // TRANSLATORS: part of a shutdown message // %1 is replaced with a device name // Newline at the end is required - ipl_msg = sformat (_(" -After shutdown, reload the system + ipl_msg = sformat (_("After shutdown, reload the system with an IPL from DASD '%1'. "), dev); } else if (newConfiguration["method"]:"ERROR" == "fcp") { - y2milestone("making fcp ipl text"); string dev = substring (newFcpMap["device"]:"", 4, 4); string wwpn = newFcpMap["wwpn"]:""; string lun = newFcpMap["lun"]:""; @@ -81,24 +65,13 @@ // %2 is replaced with a WWPN name // %3 is replaced with a LUN name // Newline at the end is required - ipl_msg = sformat (_(" -After shutdown, reload the system -with an IPL from FCP '%1' -with WWPN '%2' + ipl_msg = sformat (_("After shutdown, reload the system +with an IPL from FCP '%1' with WWPN '%2' and LUN '%3'. "), dev, wwpn, lun); - } else { - y2warning("cannot make ipl text for unknown method"); } } } - y2milestone ("Configuration (reIPL) has been changed: %1", different); - y2milestone ("Configuration (reIPL) generated shutdown dialog box message: %1", ipl_msg); - - map <string, any> ret = $["different":different, "ipl_msg":ipl_msg]; - - y2milestone("ret = %1", ret); - - return ret; -} + return $["different":different, "ipl_msg":ipl_msg]; +} \ No newline at end of file Modified: branches/SuSE-Code-11-Branch/reipl/src/reipl_finish.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/reipl/src/reipl_finish.ycp?rev=55331&r1=55330&r2=55331&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/reipl/src/reipl_finish.ycp (original) +++ branches/SuSE-Code-11-Branch/reipl/src/reipl_finish.ycp Mon Feb 9 10:57:00 2009 @@ -16,46 +16,33 @@ import "Arch"; import "Reipl"; - boolean different = true; + boolean different = false; // Other architectures do not support it if (Arch::s390 ()) { map <string, any> oldConfiguration = Reipl::ReadState (); - map <string, any> newConfiguration = Reipl::ReadState (); + map <string, any> newConfiguration = oldConfiguration; if (oldConfiguration != nil) { - newConfiguration = Reipl::ModifyReiplWithBootPartition (newConfiguration); + newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration); map oldCcwMap = (map)oldConfiguration["ccw"]:nil; map newCcwMap = (map)newConfiguration["ccw"]:nil; map oldFcpMap = (map)oldConfiguration["fcp"]:nil; map newFcpMap = (map)newConfiguration["fcp"]:nil; - different = (oldConfiguration["method"]:"a" != newConfiguration["method"]:"b") - || (oldCcwMap["device"]:"a" != newCcwMap["device"]:"b") - || (oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b") - || (oldCcwMap["parm"]:"a" != newCcwMap["parm"]:"b") - || (oldFcpMap["device"]:"a" != newFcpMap["device"]:"b") - || (oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b") - || (oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b") - || (oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b") - || (oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b"); - - y2milestone("(oldConfiguration['method']:'a' != newConfiguration['method']:'b') = %1", (oldConfiguration["method"]:"a" != newConfiguration["method"]:"b")); - y2milestone("(oldCcwMap['device']:'a' != newCcwMap['device']:'b') = %1", (oldCcwMap["device"]:"a" != newCcwMap["device"]:"b")); - y2milestone("(oldCcwMap['loadparm']:'a' != newCcwMap['loadparm']:'b') = %1", (oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b")); - y2milestone("(oldCcwMap['parm']:'a' != newCcwMap['parm']:'b') = %1", (oldCcwMap["parm"]:"a" != newCcwMap["parm"]:"b")); - y2milestone("(oldFcpMap['device']:'a' != newFcpMap['device']:'b') = %1", (oldFcpMap["device"]:"a" != newFcpMap["device"]:"b")); - y2milestone("(oldFcpMap['wwpn']:'a' != newFcpMap['wwpn']:'b') = %1", (oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b")); - y2milestone("(oldFcpMap['lun']:'a' != newFcpMap['lun']:'b') = %1", (oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b")); - y2milestone("(oldFcpMap['bootprog']:'a' != newFcpMap['bootprog']:'b') = %1", (oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b")); - y2milestone("(oldFcpMap['br_lba']:'a' != newFcpMap['br_lba']:'b') = %1", (oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b")); - y2milestone("different = %1", different); - + different = oldConfiguration["method"]:"a" != newConfiguration["method"]:"b" + && oldCcwMap["device"]:"a" != newCcwMap["device"]:"b" + && oldCcwMap["loadparm"]:"a" != newCcwMap["loadparm"]:"b" + && oldFcpMap["device"]:"a" != newFcpMap["device"]:"b" + && oldFcpMap["wwpn"]:"a" != newFcpMap["wwpn"]:"b" + && oldFcpMap["lun"]:"a" != newFcpMap["lun"]:"b" + && oldFcpMap["bootprog"]:"a" != newFcpMap["bootprog"]:"b" + && oldFcpMap["br_lba"]:"a" != newFcpMap["br_lba"]:"b"; } y2milestone ("Configuration (reIPL) has been changed: %1", different); } return different; -} +} \ No newline at end of file -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsrain@svn.opensuse.org