Author: jsrain
Date: Mon Feb 9 09:57:37 2009
New Revision: 55324
URL: http://svn.opensuse.org/viewcvs/yast?rev=55324&view=rev
Log:
more rebooting fixes from IBM (bnc #471522)
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=55324&r1=55323&r2=55324&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/reipl/VERSION (original)
+++ branches/SuSE-Code-11-Branch/reipl/VERSION Mon Feb 9 09:57:37 2009
@@ -1 +1 @@
-2.17.3
+2.17.4
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=55324&r1=55323&r2=55324&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 09:57:37 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+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=55324&r1=55323&r2=55324&view=diff
==============================================================================
--- branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp (original)
+++ branches/SuSE-Code-11-Branch/reipl/src/Reipl.ycp Mon Feb 9 09:57:37 2009
@@ -137,7 +137,8 @@
// "method": "ccw",
// "ccw": $[
// "device": "0.0.4711",
-// "loadparm": ""
+// "loadparm": "",
+// "parm": "" /* SLES 11 and z/VM only */
// ],
// "fcp": $[
// "device": "0.0.4711",
@@ -184,6 +185,7 @@
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) {
@@ -363,12 +365,13 @@
}
/**
- * Modifys the reipl configuration passed in with what it should be for the detected
+ * Returns the reipl configuration passed in with what it should be for the detected
* boot partition.
- * @param configuration the current configuration.
- * @return a map of the new configuration.
+ * @param configuration an old configuration.
+ * @return a map of the new target configuration.
*/
global map ModifyReiplWithBootPartition (map configuration) {
+ // get target information
list<string> uParts = FindBootPartition ();
if (uParts == nil) {
@@ -380,12 +383,7 @@
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!");
@@ -393,12 +391,7 @@
}
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");
@@ -408,45 +401,29 @@
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"] = "";
- fcp_map["br_lba"] = "";
-
+ fcp_map["bootprog"] = "0";
+ fcp_map["br_lba"] = "0";
configuration["fcp"] = fcp_map;
- }
+ y2milestone ("ModifyReiplWithBootPartition: modified fcp map");
}
else {
- y2error ("ModifyReiplWithBootPartition: Should not be here!");
-
- configuration = nil;
+ y2error ("ModifyReiplWithBootPartition: Should not be here, configuration unmodified!");
}
return configuration;
@@ -458,50 +435,44 @@
*/
global map ReadState () {
map 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 nil;
+ return configuration;
}
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 {
- y2error ("Reipl::Read: ccw is not configured.");
-
- configuration["ccw"] = nil;
+ y2warning ("Reipl::Read: ccw is not configured.");
}
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");
@@ -513,7 +484,7 @@
configuration["fcp"] = fcp_map;
}
else {
- configuration["fcp"] = nil;
+ y2warning ("Reipl::Read: fcp is not configured.");
}
configuration["method"] = deletechars ((string)SCR::Read (.target.string, reipl_directory + "/reipl_type"), "\n\r");
@@ -550,11 +521,6 @@
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) {
@@ -590,6 +556,7 @@
rc = false;
}
+
}
else {
y2error ("Reipl::WriteState: ccw_map is nil!");
@@ -695,7 +662,8 @@
map ccwIn = (map)settings["ccw"]:$[];
map ccwOut = $[
"device": "",
- "loadparm": ""
+ "loadparm": "",
+ "parm": "" /* SLES 11 and z/VM only */
];
if (ccwIn["device"]:nil != nil) {
@@ -704,6 +672,10 @@
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=55324&r1=55323&r2=55324&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 09:57:37 2009
@@ -65,14 +65,13 @@
boolean rc = true;
- map oldConfiguration = Reipl::ReadState ();
- map newConfiguration = nil;
+ map configuration = Reipl::ReadState ();
- if (oldConfiguration != nil) {
- newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration);
+ if (configuration != nil) {
+ configuration = Reipl::ModifyReiplWithBootPartition (configuration);
- if (newConfiguration != nil) {
- Reipl::WriteState (newConfiguration);
+ if (configuration != nil) {
+ Reipl::WriteState (configuration);
}
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=55324&r1=55323&r2=55324&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 09:57:37 2009
@@ -20,42 +20,58 @@
textdomain "reipl";
- boolean different = false;
+ boolean different = true;
string ipl_msg = "";
// Other architectures do not support it
if (Arch::s390 ()) {
map oldConfiguration = Reipl::ReadState ();
- map newConfiguration = oldConfiguration;
+ map newConfiguration = Reipl::ReadState ();
if (oldConfiguration != nil) {
- newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration);
+ newConfiguration = Reipl::ModifyReiplWithBootPartition (newConfiguration);
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"
- && 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";
+ 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);
+ 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"]:"";
@@ -65,13 +81,24 @@
// %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");
}
}
}
- return $["different":different, "ipl_msg":ipl_msg];
-}
\ No newline at end of file
+ y2milestone ("Configuration (reIPL) has been changed: %1", different);
+ y2milestone ("Configuration (reIPL) generated shutdown dialog box message: %1", ipl_msg);
+
+ map ret = $["different":different, "ipl_msg":ipl_msg];
+
+ y2milestone("ret = %1", ret);
+
+ return ret;
+}
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=55324&r1=55323&r2=55324&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 09:57:37 2009
@@ -16,33 +16,46 @@
import "Arch";
import "Reipl";
- boolean different = false;
+ boolean different = true;
// Other architectures do not support it
if (Arch::s390 ()) {
map oldConfiguration = Reipl::ReadState ();
- map newConfiguration = oldConfiguration;
+ map newConfiguration = Reipl::ReadState ();
if (oldConfiguration != nil) {
- newConfiguration = Reipl::ModifyReiplWithBootPartition (oldConfiguration);
+ newConfiguration = Reipl::ModifyReiplWithBootPartition (newConfiguration);
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"
- && 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";
+ 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);
+
}
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