Script 'mail_helper' called by ro
Hello packager,
This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.
Here comes the log...
---------------------------%<------------------------------
Hi,
here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-reipl -> sle12
Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-reipl/yast2-reipl.changes 2014-01-17 14:16:32.000000000 +0100
+++ /mounts/work_src_done/SLE12/yast2-reipl/yast2-reipl.changes 2014-05-02 14:48:24.000000000 +0200
@@ -1,0 +2,6 @@
+Fri May 2 12:21:49 UTC 2014 - jreidinger@suse.com
+
+- adapt module to SLE12 code base (bcn#875515) ( patch by Ihno )
+- 3.1.2
+
+-------------------------------------------------------------------
calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
- yast2-reipl
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-reipl (Old)
and /mounts/work_src_done/SLE12/yast2-reipl (BS:build ID:37295 MAIL:yast-commit@opensuse.org) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-reipl", Maintainer is "yast-commit@opensuse.org"
Old:
----
yast2-reipl-3.1.1.tar.bz2
New:
----
yast2-reipl-3.1.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-reipl.spec ++++++
--- /var/tmp/diff_new_pack.md1zW3/_old 2014-05-02 15:39:05.000000000 +0200
+++ /var/tmp/diff_new_pack.md1zW3/_new 2014-05-02 15:39:05.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-reipl
-Version: 3.1.1
+Version: 3.1.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -31,12 +31,11 @@
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-bootloader
-BuildRequires: yast2-devtools >= 3.0.6
+BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-storage
BuildRequires: yast2-testsuite
-Requires: yast2-bootloader
-Requires: yast2-storage
+Requires: yast2-storage yast2-bootloader
# Wizard::SetDesktopTitleAndIcon
Requires: yast2 >= 2.21.22
@@ -50,6 +49,7 @@
License: GPL-2.0
Group: System/YaST
+
%description
Module for loading IPL from running system on S/390
@@ -62,6 +62,7 @@
%install
%yast_install
+
%post
%{fillup_only -ns security checksig}
++++++ yast2-reipl-3.1.1.tar.bz2 -> yast2-reipl-3.1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/VERSION new/yast2-reipl-3.1.2/VERSION
--- old/yast2-reipl-3.1.1/VERSION 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/VERSION 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-3.1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/package/yast2-reipl.changes new/yast2-reipl-3.1.2/package/yast2-reipl.changes
--- old/yast2-reipl-3.1.1/package/yast2-reipl.changes 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/package/yast2-reipl.changes 2014-05-02 14:45:42.000000000 +0200
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri May 2 12:21:49 UTC 2014 - jreidinger@suse.com
+
+- adapt module to SLE12 code base (bcn#875515) ( patch by Ihno )
+- 3.1.2
+
+-------------------------------------------------------------------
Wed Nov 13 15:56:18 UTC 2013 - jreidinger@suse.com
- Add explicit COPYING file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/package/yast2-reipl.spec new/yast2-reipl-3.1.2/package/yast2-reipl.spec
--- old/yast2-reipl-3.1.1/package/yast2-reipl.spec 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/package/yast2-reipl.spec 2014-05-02 14:45:42.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-reipl
-Version: 3.1.1
+Version: 3.1.2
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -31,7 +31,7 @@
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-bootloader
-BuildRequires: yast2-devtools >= 3.0.6
+BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-storage
BuildRequires: yast2-testsuite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/inst_reipl.rb new/yast2-reipl-3.1.2/src/clients/inst_reipl.rb
--- old/yast2-reipl-3.1.1/src/clients/inst_reipl.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/inst_reipl.rb 2014-05-02 14:45:42.000000000 +0200
@@ -46,8 +46,7 @@
Yast.include self, "reipl/dialogs.rb"
# The main ()
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("Reipl module started")
+ Builtins.y2milestone("Reipl module started ----------------------------------------")
@args = GetInstArgs.argmap
@@ -64,8 +63,7 @@
@ret = Convert.to_symbol(ConfigureDialog())
# Finish
- Builtins.y2milestone("Reipl module finished")
- Builtins.y2milestone("----------------------------------------")
+ Builtins.y2milestone("Reipl module finished ----------------------------------------")
@ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/inst_reiplauto.rb new/yast2-reipl-3.1.2/src/clients/inst_reiplauto.rb
--- old/yast2-reipl-3.1.1/src/clients/inst_reiplauto.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/inst_reiplauto.rb 2014-05-02 14:45:42.000000000 +0200
@@ -43,19 +43,12 @@
Yast.import "Confirm"
Yast.import "Storage"
# The main ()
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("inst_reiplauto started")
-
- if !Reipl.SanityCheck
- Builtins.y2milestone("SanityCheck failed!")
- return :cancel
- end
+ Builtins.y2milestone("inst_reiplauto started ----------------------------------------")
@args = GetInstArgs.argmap
- if Ops.get_string(@args, "first_run", "yes") != "no"
- Ops.set(@args, "first_run", "yes")
- end
+ # first run unless explicitelly mentioned
+ @args["first_run"] = "yes" if @args["first_run"] != "no"
Wizard.HideAbortButton if Mode.mode == "firstboot"
@@ -63,12 +56,8 @@
@configuration = Reipl.ReadState
- if @configuration != nil
- @configuration = Reipl.ModifyReiplWithBootPartition(@configuration)
-
- if @configuration != nil
- Reipl.WriteState(@configuration)
- else
+ if !@configuration.nil?
+ if !Reipl.IPL_from_boot_zipl
Builtins.y2error("Could not modify reipl configuration")
end
else
@@ -76,10 +65,9 @@
end
# Finish
- Builtins.y2milestone("inst_reiplauto finished")
- Builtins.y2milestone("----------------------------------------")
+ Builtins.y2milestone("inst_reiplauto finished ----------------------------------------")
- :next
+ :next
# EOF
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/reipl.rb new/yast2-reipl-3.1.2/src/clients/reipl.rb
--- old/yast2-reipl-3.1.1/src/clients/reipl.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/reipl.rb 2014-05-02 14:45:42.000000000 +0200
@@ -38,8 +38,7 @@
textdomain "reipl"
# The main ()
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("Reipl module started")
+ Builtins.y2milestone("Reipl module started ----------------------------------------")
Yast.import "Progress"
Yast.import "Report"
@@ -89,8 +88,7 @@
Builtins.y2debug("ret=%1", @ret)
# Finish
- Builtins.y2milestone("Reipl module finished")
- Builtins.y2milestone("----------------------------------------")
+ Builtins.y2milestone("Reipl module finished ----------------------------------------")
deep_copy(@ret)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/reipl_auto.rb new/yast2-reipl-3.1.2/src/clients/reipl_auto.rb
--- old/yast2-reipl-3.1.1/src/clients/reipl_auto.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/reipl_auto.rb 2014-05-02 14:45:42.000000000 +0200
@@ -42,8 +42,7 @@
textdomain "reipl"
- Builtins.y2milestone("----------------------------------------")
- Builtins.y2milestone("Reipl auto started")
+ Builtins.y2milestone("Reipl auto started ----------------------------------------")
Yast.import "Reipl"
Yast.include self, "reipl/wizards.rb"
@@ -111,8 +110,7 @@
end
Builtins.y2debug("ret=%1", @ret)
- Builtins.y2milestone("Reipl auto finished")
- Builtins.y2milestone("----------------------------------------")
+ Builtins.y2milestone("Reipl auto finished ----------------------------------------")
deep_copy(@ret)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/reipl_bootloader_finish.rb new/yast2-reipl-3.1.2/src/clients/reipl_bootloader_finish.rb
--- old/yast2-reipl-3.1.1/src/clients/reipl_bootloader_finish.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/reipl_bootloader_finish.rb 2014-05-02 14:45:42.000000000 +0200
@@ -28,88 +28,31 @@
# Other architectures do not support it
if Arch.s390
@oldConfiguration = Reipl.ReadState
- @newConfiguration = Reipl.ReadState
- if @oldConfiguration != nil
- @newConfiguration = Reipl.ModifyReiplWithBootPartition(
- @newConfiguration
- )
+ if !Reipl.IPL_from_boot_zipl
+ @newConfiguration = Reipl.ReadState
@oldCcwMap = Ops.get_map(@oldConfiguration, "ccw")
@newCcwMap = Ops.get_map(@newConfiguration, "ccw")
@oldFcpMap = Ops.get_map(@oldConfiguration, "fcp")
@newFcpMap = Ops.get_map(@newConfiguration, "fcp")
- @different = Ops.get_string(@oldConfiguration, "method", "a") !=
- Ops.get_string(@newConfiguration, "method", "b") ||
- Ops.get_string(@oldCcwMap, "device", "a") !=
- Ops.get_string(@newCcwMap, "device", "b") ||
- Ops.get_string(@oldCcwMap, "loadparm", "a") !=
- Ops.get_string(@newCcwMap, "loadparm", "b") ||
- Ops.get_string(@oldCcwMap, "parm", "a") !=
- Ops.get_string(@newCcwMap, "parm", "b") ||
- Ops.get_string(@oldFcpMap, "device", "a") !=
- Ops.get_string(@newFcpMap, "device", "b") ||
- Ops.get_string(@oldFcpMap, "wwpn", "a") !=
- Ops.get_string(@newFcpMap, "wwpn", "b") ||
- Ops.get_string(@oldFcpMap, "lun", "a") !=
- Ops.get_string(@newFcpMap, "lun", "b") ||
- Ops.get_string(@oldFcpMap, "bootprog", "a") !=
- Ops.get_string(@newFcpMap, "bootprog", "b") ||
- Ops.get_string(@oldFcpMap, "br_lba", "a") !=
- Ops.get_string(@newFcpMap, "br_lba", "b")
-
- Builtins.y2milestone(
- "(oldConfiguration['method']:'a' != newConfiguration['method']:'b') = %1",
- Ops.get_string(@oldConfiguration, "method", "a") !=
- Ops.get_string(@newConfiguration, "method", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['device']:'a' != newCcwMap['device']:'b') = %1",
- Ops.get_string(@oldCcwMap, "device", "a") !=
- Ops.get_string(@newCcwMap, "device", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['loadparm']:'a' != newCcwMap['loadparm']:'b') = %1",
- Ops.get_string(@oldCcwMap, "loadparm", "a") !=
- Ops.get_string(@newCcwMap, "loadparm", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['parm']:'a' != newCcwMap['parm']:'b') = %1",
- Ops.get_string(@oldCcwMap, "parm", "a") !=
- Ops.get_string(@newCcwMap, "parm", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['device']:'a' != newFcpMap['device']:'b') = %1",
- Ops.get_string(@oldFcpMap, "device", "a") !=
- Ops.get_string(@newFcpMap, "device", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['wwpn']:'a' != newFcpMap['wwpn']:'b') = %1",
- Ops.get_string(@oldFcpMap, "wwpn", "a") !=
- Ops.get_string(@newFcpMap, "wwpn", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['lun']:'a' != newFcpMap['lun']:'b') = %1",
- Ops.get_string(@oldFcpMap, "lun", "a") !=
- Ops.get_string(@newFcpMap, "lun", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['bootprog']:'a' != newFcpMap['bootprog']:'b') = %1",
- Ops.get_string(@oldFcpMap, "bootprog", "a") !=
- Ops.get_string(@newFcpMap, "bootprog", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['br_lba']:'a' != newFcpMap['br_lba']:'b') = %1",
- Ops.get_string(@oldFcpMap, "br_lba", "a") !=
- Ops.get_string(@newFcpMap, "br_lba", "b")
- )
+ ccw_different = ["device", "loadparm", "parm"].any? do |param|
+ # TODO: why two nils are different?
+ res = @oldCcwMap[param].nil? || @newCcwMap[param].nil? || @oldCcwMap[param] != @newCcwMap[param]
+ Builtins.y2milestone "ccw comparison for '#{param}' is different?: #{res}"
+ res
+ end
+ fcp_different = ["device", "wwpn", "lun", "bootprog", "br_lba"].any? do |param|
+ # TODO: why two nils are different?
+ res = @oldFcpMap[param].nil? || @newFcpMap[param].nil? || @oldFcpMap[param] != @newFcpMap[param]
+ Builtins.y2milestone "fcp comparison for '#{param}' is different?: #{res}"
+ res
+ end
+ @different = ccw_different || fcp_different
Builtins.y2milestone("different = %1", @different)
- Builtins.y2milestone(
- "newConfiguration['method'] : %1",
- Ops.get_string(@newConfiguration, "method", "ERROR")
- )
+ Builtins.y2milestone("newConfiguration['method'] : %1", Ops.get_string(@newConfiguration, "method", "ERROR"))
if Ops.get_string(@newConfiguration, "method", "ERROR") == "ccw"
Builtins.y2milestone("making ccw ipl text")
@dev = Builtins.substring(
@@ -170,14 +113,8 @@
end
end
- Builtins.y2milestone(
- "Configuration (reIPL) has been changed: %1",
- @different
- )
- Builtins.y2milestone(
- "Configuration (reIPL) generated shutdown dialog box message: %1",
- @ipl_msg
- )
+ Builtins.y2milestone("Configuration (reIPL) has been changed: %1", @different)
+ Builtins.y2milestone("Configuration (reIPL) generated shutdown dialog box message: %1", @ipl_msg)
@ret = { "different" => @different, "ipl_msg" => @ipl_msg }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/clients/reipl_finish.rb new/yast2-reipl-3.1.2/src/clients/reipl_finish.rb
--- old/yast2-reipl-3.1.1/src/clients/reipl_finish.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/clients/reipl_finish.rb 2014-05-02 14:45:42.000000000 +0200
@@ -23,89 +23,35 @@
# Other architectures do not support it
if Arch.s390
@oldConfiguration = Reipl.ReadState
- @newConfiguration = Reipl.ReadState
- if @oldConfiguration != nil
- @newConfiguration = Reipl.ModifyReiplWithBootPartition(
- @newConfiguration
- )
+ # FIXME almost same code as reipl_bootloader_finish and this client is not called at all now
+ if Reipl.IPL_from_boot_zipl
+
+ @newConfiguration = Reipl.ReadState
@oldCcwMap = Ops.get_map(@oldConfiguration, "ccw")
@newCcwMap = Ops.get_map(@newConfiguration, "ccw")
@oldFcpMap = Ops.get_map(@oldConfiguration, "fcp")
@newFcpMap = Ops.get_map(@newConfiguration, "fcp")
- @different = Ops.get_string(@oldConfiguration, "method", "a") !=
- Ops.get_string(@newConfiguration, "method", "b") ||
- Ops.get_string(@oldCcwMap, "device", "a") !=
- Ops.get_string(@newCcwMap, "device", "b") ||
- Ops.get_string(@oldCcwMap, "loadparm", "a") !=
- Ops.get_string(@newCcwMap, "loadparm", "b") ||
- Ops.get_string(@oldCcwMap, "parm", "a") !=
- Ops.get_string(@newCcwMap, "parm", "b") ||
- Ops.get_string(@oldFcpMap, "device", "a") !=
- Ops.get_string(@newFcpMap, "device", "b") ||
- Ops.get_string(@oldFcpMap, "wwpn", "a") !=
- Ops.get_string(@newFcpMap, "wwpn", "b") ||
- Ops.get_string(@oldFcpMap, "lun", "a") !=
- Ops.get_string(@newFcpMap, "lun", "b") ||
- Ops.get_string(@oldFcpMap, "bootprog", "a") !=
- Ops.get_string(@newFcpMap, "bootprog", "b") ||
- Ops.get_string(@oldFcpMap, "br_lba", "a") !=
- Ops.get_string(@newFcpMap, "br_lba", "b")
-
- Builtins.y2milestone(
- "(oldConfiguration['method']:'a' != newConfiguration['method']:'b') = %1",
- Ops.get_string(@oldConfiguration, "method", "a") !=
- Ops.get_string(@newConfiguration, "method", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['device']:'a' != newCcwMap['device']:'b') = %1",
- Ops.get_string(@oldCcwMap, "device", "a") !=
- Ops.get_string(@newCcwMap, "device", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['loadparm']:'a' != newCcwMap['loadparm']:'b') = %1",
- Ops.get_string(@oldCcwMap, "loadparm", "a") !=
- Ops.get_string(@newCcwMap, "loadparm", "b")
- )
- Builtins.y2milestone(
- "(oldCcwMap['parm']:'a' != newCcwMap['parm']:'b') = %1",
- Ops.get_string(@oldCcwMap, "parm", "a") !=
- Ops.get_string(@newCcwMap, "parm", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['device']:'a' != newFcpMap['device']:'b') = %1",
- Ops.get_string(@oldFcpMap, "device", "a") !=
- Ops.get_string(@newFcpMap, "device", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['wwpn']:'a' != newFcpMap['wwpn']:'b') = %1",
- Ops.get_string(@oldFcpMap, "wwpn", "a") !=
- Ops.get_string(@newFcpMap, "wwpn", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['lun']:'a' != newFcpMap['lun']:'b') = %1",
- Ops.get_string(@oldFcpMap, "lun", "a") !=
- Ops.get_string(@newFcpMap, "lun", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['bootprog']:'a' != newFcpMap['bootprog']:'b') = %1",
- Ops.get_string(@oldFcpMap, "bootprog", "a") !=
- Ops.get_string(@newFcpMap, "bootprog", "b")
- )
- Builtins.y2milestone(
- "(oldFcpMap['br_lba']:'a' != newFcpMap['br_lba']:'b') = %1",
- Ops.get_string(@oldFcpMap, "br_lba", "a") !=
- Ops.get_string(@newFcpMap, "br_lba", "b")
- )
+ ccw_different = ["device", "loadparm", "parm"].any? do |param|
+ # TODO: why two nils are different?
+ res = @oldCcwMap[param].nil? || @newCcwMap[param].nil? || @oldCcwMap[param] != @newCcwMap[param]
+ Builtins.y2milestone "ccw comparison for '#{param}' is different?: #{res}"
+ res
+ end
+ fcp_different = ["device", "wwpn", "lun", "bootprog", "br_lba"].any? do |param|
+ # TODO: why two nils are different?
+ res = @oldFcpMap[param].nil? || @newFcpMap[param].nil? || @oldFcpMap[param] != @newFcpMap[param]
+ Builtins.y2milestone "fcp comparison for '#{param}' is different?: #{res}"
+ res
+ end
+
+ @different = ccw_different || fcp_different
Builtins.y2milestone("different = %1", @different)
end
- Builtins.y2milestone(
- "Configuration (reIPL) has been changed: %1",
- @different
- )
+ Builtins.y2milestone("Configuration (reIPL) has been changed: %1", @different)
end
@different
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/include/reipl/dialogs.rb new/yast2-reipl-3.1.2/src/include/reipl/dialogs.rb
--- old/yast2-reipl-3.1.1/src/include/reipl/dialogs.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/include/reipl/dialogs.rb 2014-05-02 14:45:42.000000000 +0200
@@ -42,15 +42,9 @@
# Configure dialog
# @return dialog result
def ConfigureDialog
- ccw_map = Convert.convert(
- Ops.get(Reipl.reipl_configuration, "ccw") do
+ ccw_map = Reipl.reipl_configuration["ccw"] ||
{ "device" => "", "loadparm" => "" }
- end,
- :from => "any",
- :to => "map "
- )
- fcp_map = Convert.convert(
- Ops.get(Reipl.reipl_configuration, "fcp") do
+ fcp_map = Reipl.reipl_configuration["fcp"] ||
{
"device" => "",
"wwpn" => "",
@@ -58,10 +52,8 @@
"bootprog" => "",
"br_lba" => ""
}
- end,
- :from => "any",
- :to => "map "
- )
+ nss_map = Reipl.reipl_configuration["nss"] ||
+ { "name" => "" }
# Reipl configure dialog caption
caption = _("Reipl Configuration")
@@ -77,7 +69,6 @@
Left(
RadioButton(
Id(:useccw),
- Opt(:notify),
_("&ccw"),
Reipl.ccw_exists
)
@@ -85,11 +76,17 @@
Left(
RadioButton(
Id(:usefcp),
- Opt(:notify),
_("&fcp"),
Reipl.fcp_exists
)
),
+ Left(
+ RadioButton(
+ Id(:usenss),
+ _("&nss"),
+ Reipl.nss_exists
+ )
+ ),
VSpacing(0.2)
)
)
@@ -144,11 +141,19 @@
_("B&oot program selector"),
Ops.get_string(fcp_map, "bootprog", "")
),
+ VSpacing(0.2)
+ )
+ )
+
+ nss_contents = Frame(
+ Id(:nss_frame),
+ _("nss parameters"),
+ VBox(
VSpacing(0.2),
TextEntry(
- Id(:fcp_br_lba),
- _("Boo&t record logical block address"),
- Ops.get_string(fcp_map, "br_lba", "")
+ Id(:nss_name),
+ _("&Name"),
+ Ops.get_string(ccw_map, "name", "")
),
VSpacing(0.2)
)
@@ -160,7 +165,9 @@
VSpacing(1),
ccw_contents,
VSpacing(1),
- fcp_contents
+ fcp_contents,
+ VSpacing(1),
+ nss_contents
)
)
@@ -176,6 +183,8 @@
UI.ChangeWidget(Id(:useccw), :Enabled, Reipl.ccw_exists)
UI.ChangeWidget(Id(:fcp_frame), :Enabled, Reipl.fcp_exists)
UI.ChangeWidget(Id(:usefcp), :Enabled, Reipl.fcp_exists)
+ UI.ChangeWidget(Id(:nss_frame), :Enabled, Reipl.nss_exists)
+ UI.ChangeWidget(Id(:usenss), :Enabled, Reipl.nss_exists)
# @TODO
# UI::ChangeWidget(`id(`ccw_device), `ValidChars, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-");
@@ -215,8 +224,10 @@
Convert.to_string(UI.QueryWidget(Id(:fcp_bootprog), :Value))
Reipl.modified = true
end
- if Ops.get_string(fcp_map, "br_lba", "") !=
- Convert.to_string(UI.QueryWidget(Id(:fcp_br_lba), :Value))
+ end
+ if Reipl.nss_exists
+ if Ops.get_string(nss_map, "name", "") !=
+ Convert.to_string(UI.QueryWidget(Id(:nss_name), :Value))
Reipl.modified = true
end
end
@@ -229,14 +240,10 @@
elsif ret == :next
# Grab the data from the entry fields
if Reipl.ccw_exists
- Ops.set(
- ccw_map,
- "device",
+ Ops.set(ccw_map, "device",
Convert.to_string(UI.QueryWidget(Id(:ccw_device), :Value))
)
- Ops.set(
- ccw_map,
- "loadparm",
+ Ops.set(ccw_map, "loadparm",
Convert.to_string(UI.QueryWidget(Id(:ccw_loadparm), :Value))
)
@@ -265,23 +272,21 @@
"bootprog",
Convert.to_string(UI.QueryWidget(Id(:fcp_bootprog), :Value))
)
- Ops.set(
- fcp_map,
- "br_lba",
- Convert.to_string(UI.QueryWidget(Id(:fcp_br_lba), :Value))
- )
-
# Apparently, maps are copy on write. We need to put the new one back into the globals.
Ops.set(Reipl.reipl_configuration, "fcp", fcp_map)
end
+ if Reipl.nss_exists
+ Ops.set(nss_map, "name",
+ Convert.to_string(UI.QueryWidget(Id(:nss_name), :Value))
+ )
+ # Apparently, maps are copy on write. We need to put the new one back into the globals.
+ Ops.set(Reipl.reipl_configuration, "nss", nss_map)
+ end
+
break
elsif ret == :back
break
- elsif ret == :usefcp
- next
- elsif ret == :useccw
- next
else
Builtins.y2error("unexpected retcode: %1", ret)
next
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-3.1.1/src/modules/Reipl.rb new/yast2-reipl-3.1.2/src/modules/Reipl.rb
--- old/yast2-reipl-3.1.1/src/modules/Reipl.rb 2013-11-15 13:12:39.000000000 +0100
+++ new/yast2-reipl-3.1.2/src/modules/Reipl.rb 2014-05-02 14:45:42.000000000 +0200
@@ -76,17 +76,19 @@
# ]
#];
- @reipl_directory = Ops.add(FindSysfsRoot(), "/firmware/reipl")
- @ccw_directory = Ops.add(@reipl_directory, "/ccw")
- @fcp_directory = Ops.add(@reipl_directory, "/fcp")
- @ccw_exists = FileUtils.IsDirectory(@ccw_directory) != nil
- @fcp_exists = FileUtils.IsDirectory(@fcp_directory) != nil
+ @reipl_directory = "/sys/firmware/reipl"
+ @ccw_directory = @reipl_directory + "/ccw"
+ @fcp_directory = @reipl_directory + "/fcp"
+ @nss_directory = @reipl_directory + "/nss"
+ @ccw_exists = FileUtils.IsDirectory(@ccw_directory)
+ @fcp_exists = FileUtils.IsDirectory(@fcp_directory)
+ @nss_exists = FileUtils.IsDirectory(@fcp_directory)
end
# Abort function
# @return [Boolean] return true if abort
def Abort
- return @AbortFunction.call == true if @AbortFunction != nil
+ return @AbortFunction.call if @AbortFunction
false
end
@@ -101,384 +103,26 @@
def SetModified
Builtins.y2debug("Reipl::SetModified")
@modified = true
-
nil
end
- # Find where sysfs has been mounted.
- # @return [String] the root
- def FindSysfsRoot
- ret = nil
- mounts = nil
-
- mounts = Convert.convert(
- SCR.Read(path(".etc.mtab")),
- :from => "any",
- :to => "list <map>"
- )
-
- Builtins.foreach(mounts) do |mount|
- Builtins.y2debug("FindSysfsRoot: mount = %1", mount)
- if ret == nil && Ops.get_string(mount, "vfstype", "ERROR") == "sysfs" &&
- Ops.get_string(mount, "spec", "ERROR") == "sysfs"
- ret = Ops.get_string(mount, "file")
- end
- end
-
- if ret == nil
- Builtins.y2error("FindSysfsRoot: after all this, ret is still nil!")
-
- # Note: This likely won't work so you need to check the results of calls using what we
- # are returning now.
- ret = "/sys"
- end
-
- Builtins.y2milestone("FindSysfsRoot: returning %1", ret)
-
- ret
- end
-
# Check to see if reipl is supported by the kernel.
# @return [Boolean] true if support exists.
- def SanityCheck
- # @TBD The following is broken during install since the id command is missing
- # bash-3.1# find `echo $PATH | tr ':' ' '` -name id
- # if (!Confirm::MustBeRoot ()) {
- # y2error ("User must be root!");
- # }
-
- if !FileUtils.IsDirectory(@reipl_directory)
- Builtins.y2error("Directory does not exist: %1", @reipl_directory)
- return false
- end
-
- if !@ccw_exists && !@fcp_exists
- Builtins.y2error(
- "Either ccw or fcp must exist under %1",
- @reipl_directory
- )
- return false
- end
-
- if @ccw_exists
- if !FileUtils.Exists(Ops.add(@ccw_directory, "/device"))
- Builtins.y2error("Missing device under %1", @ccw_directory)
- return false
- end
- if !FileUtils.Exists(Ops.add(@ccw_directory, "/loadparm"))
- Builtins.y2error("Missing loadparm under %1", @ccw_directory)
- return false
- end
- # don't check for "parm" since it might not be there under zLPAR
- end
-
- if @fcp_exists
- if !FileUtils.Exists(Ops.add(@fcp_directory, "/device"))
- Builtins.y2error("Missing device under %1", @fcp_directory)
- return false
- end
- if !FileUtils.Exists(Ops.add(@fcp_directory, "/wwpn"))
- Builtins.y2error("Missing wwpn under %1", @fcp_directory)
- return false
- end
- if !FileUtils.Exists(Ops.add(@fcp_directory, "/lun"))
- Builtins.y2error("Missing lun under %1", @fcp_directory)
- return false
- end
- if !FileUtils.Exists(Ops.add(@fcp_directory, "/bootprog"))
- Builtins.y2error("Missing bootprog under %1", @fcp_directory)
- return false
- end
- if !FileUtils.Exists(Ops.add(@fcp_directory, "/br_lba"))
- Builtins.y2error("Missing br_lba under %1", @fcp_directory)
- return false
- end
- end
-
- if !FileUtils.Exists(Ops.add(@reipl_directory, "/reipl_type"))
- Builtins.y2error("Missing reipl_type under %1", @reipl_directory)
- return false
- end
-
- true
- end
-
- # Returns the parameters of the boot partition that was found where the
- # MBR was located.
- # @return a list of parameters
- def FindBootPartition
- uParts = nil
- fError = false
- command = nil
- result = nil
-
- mp = Storage.GetMountPoints
-
- mountdata_boot = Ops.get_list(mp, "/boot", Ops.get_list(mp, "/", []))
- Builtins.y2milestone("mountdata_boot %1", mountdata_boot)
- boot_device = Ops.get_string(mountdata_boot, 0, "")
-
- # Examples: /dev/dasda2 or /dev/sda3
- Builtins.y2milestone(
- "FindBootPartition: BootPartitionDevice = %1",
- boot_device
- )
-
- # Examples: dasda2 or sda3
- fullDisk = Builtins.substring(boot_device, 5)
-
- Builtins.y2milestone("FindBootPartition: fullDisk = %1", fullDisk)
-
- if Builtins.substring(fullDisk, 0, 4) == "dasd"
- disk = nil
- # fullDisk might be a full block device or just a partition on such a
- # block device. If it is a partition we have to get rid of the suffix
- # specifying the partition in order to get the containing block device.
- # This device could have thousands of block devices, which is not uncommon
- # on s390. In such a case the devices would have names such as "dasdaab" or
- # "dasdaab1."
- split = Builtins.regexptokenize(fullDisk, "^(dasd)([a-z]*)([0-9]*)$")
-
- if split == nil || Builtins.size(split) != 3
- Builtins.y2error(
- "FindBootPartition: Could not regexptokenize fullDisk, split = %1",
- split
- )
-
- fError = true
- else
- disk = Ops.add(Ops.get(split, 0, ""), Ops.get(split, 1, ""))
- end
-
- Builtins.y2milestone(
- "FindBootPartition: found that the MBR uses dasd (%1)",
- disk
- )
-
- if disk != nil
- # bash-3.1# readlink -m /sys/block/dasda/device
- # /sys/devices/css0/0.0.0006/0.0.4dcf
- command = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("/usr/bin/readlink -n -m ", FindSysfsRoot()),
- "/block/"
- ),
- disk
- ),
- "/device"
- )
- Builtins.y2milestone("Executing %1", command)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), command)
- )
-
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "FindBootPartition: Execute errors and returns %1",
- Ops.get_integer(result, "exit", -1)
- )
- Builtins.y2error(
- "FindBootPartition: Execute stdout is \"%1\"",
- Ops.get_string(result, "stdout", "")
- )
- Builtins.y2error(
- "FindBootPartition: Execute stderr is \"%1\"",
- Ops.get_string(result, "stderr", "")
- )
-
- fError = true
- end
-
- Builtins.y2milestone("FindBootPartition: result = %1", result)
-
- readlinkParts = nil
-
- readlinkParts = Builtins.splitstring(
- Ops.get_string(result, "stdout", ""),
- "/"
- )
-
- Builtins.y2milestone(
- "FindBootPartition: readlinkParts = %1",
- readlinkParts
- )
-
- if Ops.less_than(Builtins.size(readlinkParts), 1)
- Builtins.y2error(
- "FindBootPartition: readlinkParts size is unexpected %1",
- readlinkParts
- )
-
- fError = true
- end
-
- ccwDevice = Ops.get(
- readlinkParts,
- Ops.subtract(Builtins.size(readlinkParts), 1),
- ""
- )
-
- uParts = ["ccw", ccwDevice] if !fError
- end
- elsif Builtins.substring(fullDisk, 0, 2) == "sd"
- disk = nil
- # fullDisk might be a full block device or just a partition on such a
- # block device. If it is a partition we have to get rid of the suffix
- # specifying the partition in order to get the containing block device.
- # This device could have thousands of block devices, which is not uncommon
- # on s390. In such a case the devices would have names such as "sdaab" or
- # "sdaab1."
- split = Builtins.regexptokenize(fullDisk, "^(sd)([a-z]*)([0-9]*)$")
-
- if split == nil || Builtins.size(split) != 3
- Builtins.y2error(
- "FindBootPartition: Could not regexptokenize fullDisk, split = %1",
- split
- )
-
- fError = true
- else
- disk = Ops.add(Ops.get(split, 0, ""), Ops.get(split, 1, ""))
- end
-
- if disk != nil
- Builtins.y2milestone(
- "FindBootPartition: found that the MBR uses SCSI (%1)",
- disk
- )
-
- deviceDirectory = Ops.add(
- Ops.add(Ops.add(FindSysfsRoot(), "/block/"), disk),
- "/device/"
- )
-
- # bash-3.1# cat /sys/block/sda/device/hba_id
- # 0.0.1734
- hbaId = Convert.to_string(
- SCR.Read(path(".target.string"), Ops.add(deviceDirectory, "hba_id"))
- )
-
- # bash-3.1# cat /sys/block/sda/device/wwpn
- # 0x500507630300c562
- wwpn = Convert.to_string(
- SCR.Read(path(".target.string"), Ops.add(deviceDirectory, "wwpn"))
- )
-
- # bash-3.1# cat /sys/block/sda/device/fcp_lun
- # 0x401040eb00000000
- fcpLun = Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(deviceDirectory, "fcp_lun")
- )
- )
-
- Builtins.y2milestone("FindBootPartition: hbaId = %1", hbaId)
- Builtins.y2milestone("FindBootPartition: wwpn = %1", wwpn)
- Builtins.y2milestone("FindBootPartition: fcpLun = %1", fcpLun)
-
- hbaId = Builtins.deletechars(hbaId, "\n ")
- wwpn = Builtins.deletechars(wwpn, "\n ")
- fcpLun = Builtins.deletechars(fcpLun, "\n ")
-
- if hbaId == nil || Builtins.size(hbaId) == 0
- Builtins.y2error("FindBootPartition: hbaId is empty!")
- fError = true
- end
- if wwpn == nil || Builtins.size(wwpn) == 0
- Builtins.y2error("FindBootPartition: wwpn is empty!")
- fError = true
- end
- if fcpLun == nil || Builtins.size(fcpLun) == 0
- Builtins.y2error("FindBootPartition: fcpLun is empty!")
- fError = true
- end
-
- uParts = ["zfcp", hbaId, wwpn, fcpLun] if !fError
- end
- else
- Builtins.y2error(
- "FindBootPartition: Unexpected format \"%1\"",
- fullDisk
- )
- end
-
- Builtins.y2milestone("FindBootPartition: returning uParts = %1", uParts)
-
- deep_copy(uParts)
- end
-
# Returns the reipl configuration passed in with what it should be for the detected
# boot partition.
# @param [Hash{String => Object}] configuration an old configuration.
# @return a map of the new target configuration.
- def ModifyReiplWithBootPartition(configuration)
- configuration = deep_copy(configuration)
+ def IPL_from_boot_zipl
# get target information
- uParts = FindBootPartition()
-
- if uParts == nil
- Builtins.y2error("ModifyReiplWithBootPartition: uParts is nil")
- end
-
- fCCW = false
- fFCP = false
-
- if Builtins.size(uParts) == 2
- if Ops.get(uParts, 0, "") == "ccw"
- fCCW = true
- else
- Builtins.y2error(
- "ModifyReiplWithBootPartition: size of uParts is 2, but first word is not ccw!"
- )
- end
- elsif Builtins.size(uParts) == 4
- if Ops.get(uParts, 0, "") == "zfcp"
- fFCP = true
- else
- Builtins.y2error(
- "ModifyReiplWithBootPartition: size of uParts is 4, but format is not what we expect"
- )
- end
- else
- Builtins.y2error(
- "ModifyReiplWithBootPartition: size of uParts is not 2 or 4"
- )
- end
-
- if fCCW
- Ops.set(configuration, "method", "ccw")
- ccw_map = Ops.get_map(configuration, "ccw")
-
- Ops.set(ccw_map, "device", Ops.get(uParts, 1, ""))
- Ops.set(ccw_map, "loadparm", "")
- #ccw_map["parm"] = ""; /* SLES 11 and z/VM only */ // read only
- Ops.set(configuration, "ccw", ccw_map)
- Builtins.y2milestone("ModifyReiplWithBootPartition: modified ccw map")
- elsif fFCP
- Ops.set(configuration, "method", "fcp")
- fcp_map = Ops.get_map(configuration, "fcp")
-
- Ops.set(fcp_map, "device", Ops.get(uParts, 1, ""))
- Ops.set(fcp_map, "wwpn", Ops.get(uParts, 2, ""))
- Ops.set(fcp_map, "lun", Ops.get(uParts, 3, ""))
- Ops.set(fcp_map, "bootprog", "0")
- Ops.set(fcp_map, "br_lba", "0")
- Ops.set(configuration, "fcp", fcp_map)
- Builtins.y2milestone("ModifyReiplWithBootPartition: modified fcp map")
- else
- Builtins.y2error("ModifyReiplWithBootPartition: Unknown disk type!")
- Ops.set(configuration, "method", "unknown_disk_type")
- end
-
- deep_copy(configuration)
+ result = Yast::SCR.Execute(path(".target.bash_output"), "chreipl node /mnt/boot/zipl")
+ return result["exit"] == 0
end
# Read all reipl settings
# @return [Hash{String => Object}] of settings
def ReadState
configuration = {}
+ Builtins.y2milestone("ReadState: The beginngn")
Ops.set(
configuration,
"ccw",
@@ -487,152 +131,39 @@
Ops.set(
configuration,
"fcp",
- {
- "device" => "",
- "wwpn" => "",
- "lun" => "",
- "bootprog" => "",
- "br_lba" => ""
- }
+ { "device" => "", "wwpn" => "", "lun" => "", "bootprog" => "", "br_lba" => "", "bootparms" => "" }
)
+ Ops.set(
+ configuration,
+ "nss",
+ { "name" => "", "loadparm" => "", "parm" => "" }
+ )
+
+ result = Yast::SCR.Execute(path(".target.bash_output"), "lsreipl")
+ raise "Calling lsreipl failed with #{result["stderr"]}" unless result["exit"].zero?
+
+ lsreipl_lines = result["stdout"].split("\n")
+ type = lsreipl_lines[0][/ccw$|fcp$|node$/]
+ if type == "ccw"
+ ccw_map = Ops.get_map(configuration, "ccw")
+ Ops.set(ccw_map, "device", Builtins.deletechars(Convert.to_string(lsreipl_lines[1][/[0-3]\.[0-3]\.[\h.]*$/]), "\n "))
+ Ops.set(ccw_map, "loadparm", Builtins.deletechars(Convert.to_string(lsreipl_lines[2][/".*"$/]), "\n \""))
+ Ops.set(ccw_map, "parm", Builtins.deletechars(Convert.to_string(lsreipl_lines[3][/".*"$/]), "\n \""))
+ Ops.set(configuration, "ccw", ccw_map)
+ end
+ if type == "fcp"
+ fcp_map = Ops.get_map(configuration, "fcp")
+ Ops.set(ccw_map, "wwpm", Builtins.deletechars(Convert.to_string(lsreipl_lines[1][/[x\h]*$/]), "\n "))
+ Ops.set(ccw_map, "lun", Builtins.deletechars(Convert.to_string(lsreipl_lines[2][/[x\h]*$/]), "\n "))
+ Ops.set(ccw_map, "device", Builtins.deletechars(Convert.to_string(lsreipl_lines[3][/[0-3]\.[0-3]\.[\h.]*$/]), "\n "))
+ Ops.set(ccw_map, "bootprog", Builtins.deletechars(Convert.to_string(lsreipl_lines[4][/[0-9]*$/]), "\n "))
+ Ops.set(ccw_map, "br_lbr", Builtins.deletechars(Convert.to_string(lsreipl_lines[5][/[0-9]*$/]), "\n "))
+ Ops.set(ccw_map, "bootparms", Builtins.deletechars(Convert.to_string(lsreipl_lines[6][/".*"*$/]), "\n \""))
+ Ops.set(configuration, "fcp", fcp_map)
- if !SanityCheck()
- Builtins.y2error("Reipl::Read: SanityCheck failed!")
-
- # 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 deep_copy(configuration)
- end
-
- if @ccw_exists
- ccw_map = Ops.get_map(configuration, "ccw")
-
- Ops.set(
- ccw_map,
- "device",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@ccw_directory, "/device")
- )
- ),
- "\n "
- )
- )
- Ops.set(
- ccw_map,
- "loadparm",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@ccw_directory, "/loadparm")
- )
- ),
- "\n "
- )
- )
- Ops.set(
- ccw_map,
- "parm",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(path(".target.string"), Ops.add(@ccw_directory, "/parm"))
- ),
- "\n "
- )
- ) # SLES 11 and z/VM only
-
- Ops.set(configuration, "ccw", ccw_map)
- else
- Builtins.y2warning("Reipl::Read: ccw is not configured.")
- end
-
- if @fcp_exists
- fcp_map = Ops.get_map(configuration, "fcp")
-
- Ops.set(
- fcp_map,
- "device",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@fcp_directory, "/device")
- )
- ),
- "\n "
- )
- )
- Ops.set(
- fcp_map,
- "wwpn",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(path(".target.string"), Ops.add(@fcp_directory, "/wwpn"))
- ),
- "\n "
- )
- )
- Ops.set(
- fcp_map,
- "lun",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(path(".target.string"), Ops.add(@fcp_directory, "/lun"))
- ),
- "\n "
- )
- )
- Ops.set(
- fcp_map,
- "bootprog",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@fcp_directory, "/bootprog")
- )
- ),
- "\n "
- )
- )
- Ops.set(
- fcp_map,
- "br_lba",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@fcp_directory, "/br_lba")
- )
- ),
- "\n "
- )
- )
-
- Ops.set(configuration, "fcp", fcp_map)
- else
- Builtins.y2warning("Reipl::Read: fcp is not configured.")
end
- Ops.set(
- configuration,
- "method",
- Builtins.deletechars(
- Convert.to_string(
- SCR.Read(
- path(".target.string"),
- Ops.add(@reipl_directory, "/reipl_type")
- )
- ),
- "\n "
- )
- )
+ configuration["method"] = type
deep_copy(configuration)
end
@@ -642,7 +173,7 @@
def Read
configuration = ReadState()
- @reipl_configuration = deep_copy(configuration) if configuration != nil
+ @reipl_configuration = deep_copy(configuration) if configuration
return false if Abort()
@modified = false
@@ -655,94 +186,24 @@
def WriteState(configuration)
configuration = deep_copy(configuration)
rc = true
+ result = nil
if Ops.get(configuration, "method") != nil &&
Ops.get_string(configuration, "method", "unknown_disk_type") !=
"unknown_disk_type"
- Builtins.y2milestone(
- "Reipl::WriteState: writing out method %1",
- Ops.get_string(configuration, "method", "")
- )
-
- SCR.Write(
- path(".target.string"),
- Ops.add(@reipl_directory, "/reipl_type"),
- Ops.get_string(configuration, "method")
- )
- # 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.
- end
-
- if @ccw_exists
- result = nil
- echoCmd = nil
-
- Builtins.y2milestone(
- "Reipl::WriteState: writing out ccw configuration."
- )
+ type = Ops.get_string(configuration, "method")
+ Builtins.y2milestone("Reipl::WriteState: writing out method %1", type)
+ end
+
+ if type == "ccw"
ccw_map = Ops.get_map(configuration, "ccw")
if ccw_map != nil
- Builtins.y2milestone(
- "Reipl::WriteState: ccw_map device is now \"%1\"",
- Ops.get_string(ccw_map, "device", "???")
- )
- Builtins.y2milestone(
- "Reipl::WriteState: ccw_map loadparm is now \"%1\"",
- Ops.get_string(ccw_map, "loadparm", "???")
- )
-
- # NOTE: It should be this, but you cannot write an empty ("") string out!
- # rc = SCR::Write (.target.string, ccw_directory + "/device", (string)ccw_map["device"]:nil);
- # rc = SCR::Write (.target.string, ccw_directory + "/loadparm", (string)ccw_map["loadparm"]:nil);
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(ccw_map, "device")),
- "\" > "
- ),
- @ccw_directory
- ),
- "/device"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing ccw device returns %1",
- Ops.get_string(result, "stderr", "")
- )
-
- rc = false
- end
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(ccw_map, "loadparm")),
- "\" > "
- ),
- @ccw_directory
- ),
- "/loadparm"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing ccw loadparm returns %1",
- Ops.get_string(result, "stderr", "")
- )
- rc = false
- end
+ device = Ops.get_string(ccw_map, "device", "???")
+ loadparm = Ops.get_string(ccw_map, "loadparm", "???")
+
else
Builtins.y2error("Reipl::WriteState: ccw_map is nil!")
@@ -750,158 +211,46 @@
end
end
- if @fcp_exists
- result = nil
- echoCmd = nil
-
- Builtins.y2milestone(
- "Reipl::WriteState: writing out fcp configuration."
- )
-
+ if type == "fcp"
fcp_map = Ops.get_map(configuration, "fcp")
if fcp_map != nil
- Builtins.y2milestone(
- "Reipl::WriteState: fcp_map device is now \"%1\"",
- Ops.get_string(fcp_map, "device", "???")
- )
- Builtins.y2milestone(
- "Reipl::WriteState: fcp_map wwpn is now \"%1\"",
- Ops.get_string(fcp_map, "wwpn", "???")
- )
- Builtins.y2milestone(
- "Reipl::WriteState: fcp_map lun is now \"%1\"",
- Ops.get_string(fcp_map, "lun", "???")
- )
- Builtins.y2milestone(
- "Reipl::WriteState: fcp_map bootprog is now \"%1\"",
- Ops.get_string(fcp_map, "bootprog", "???")
- )
- Builtins.y2milestone(
- "Reipl::WriteState: fcp_map br_lba is now \"%1\"",
- Ops.get_string(fcp_map, "br_lba", "???")
- )
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(fcp_map, "device")),
- "\" > "
- ),
- @fcp_directory
- ),
- "/device"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing fcp device returns %1",
- Ops.get_string(result, "stderr", "")
- )
-
- rc = false
- end
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(fcp_map, "wwpn")),
- "\" > "
- ),
- @fcp_directory
- ),
- "/wwpn"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing fcp wwpn returns %1",
- Ops.get_string(result, "stderr", "")
- )
-
- rc = false
- end
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(fcp_map, "lun")),
- "\" > "
- ),
- @fcp_directory
- ),
- "/lun"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing fcp lun returns %1",
- Ops.get_string(result, "stderr", "")
- )
-
- rc = false
- end
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(fcp_map, "bootprog")),
- "\" > "
- ),
- @fcp_directory
- ),
- "/bootprog"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing fcp bootprog returns %1",
- Ops.get_string(result, "stderr", "")
- )
-
- rc = false
- end
-
- echoCmd = Ops.add(
- Ops.add(
- Ops.add(
- Ops.add("echo \"", Ops.get_string(fcp_map, "br_lba")),
- "\" > "
- ),
- @fcp_directory
- ),
- "/br_lba"
- )
- Builtins.y2milestone("Executing %1", echoCmd)
- result = Convert.to_map(
- SCR.Execute(path(".target.bash_output"), echoCmd)
- )
- if Ops.get_integer(result, "exit", -1) != 0
- Builtins.y2error(
- "Error: Writing fcp br_lba returns %1",
- Ops.get_string(result, "stderr", "")
- )
+ Builtins.y2milestone("Reipl::WriteState: fcp_map device is now \"%1\"", Ops.get_string(fcp_map, "device", "???"))
+ Builtins.y2milestone("Reipl::WriteState: fcp_map wwpn is now \"%1\"", Ops.get_string(fcp_map, "wwpn", "???"))
+ Builtins.y2milestone("Reipl::WriteState: fcp_map lun is now \"%1\"", Ops.get_string(fcp_map, "lun", "???"))
+ Builtins.y2milestone("Reipl::WriteState: fcp_map bootprog is now \"%1\"", Ops.get_string(fcp_map, "bootprog", "???"))
+ Builtins.y2milestone("Reipl::WriteState: fcp_map br_lba is now \"%1\"", Ops.get_string(fcp_map, "br_lba", "???"))
+
+ device = Ops.get_string(fcp_map, "device") + " " + Ops.get_string(fcp_map, "wwpn") + " " + Ops.get_string(fcp_map, "lun")
+ loadparm = Ops.get_string(fcp_map, "loadparm", "???")
+
+ Builtins.y2milestone("FCP Device %1, loadparm %2 %1", device, loadparm)
- rc = false
- end
else
Builtins.y2error("Reipl::Write: fcp_map is nil!")
rc = false
end
end
+ if type == "nss"
+ nss_map = Ops.get_map(configuration, "nss")
+ if nss_map != nil
+ device = Ops.get_string(fcp_map, "name")
+ loadparm = ""
+ end
+ end
+ # now type, device, loadparm contain all what is needed to call chreipl
+ chreiplCmd = "chreipl " + type + " " + device
+ if loadparm != ""
+ chreiplCmd << " -L " + loadparm
+ end
+ Builtins.y2milestone("Executing %1", chreiplCmd)
+ result = Convert.to_map(SCR.Execute(path(".target.bash_output"), chreiplCmd))
+ if Ops.get_integer(result, "exit", -1) != 0
+ Builtins.y2error( "Error: Calling chreipl fails with code %1 and output %2", Ops.get_integer(result, "exit", -1), Ops.get_string(result, "stderr", ""))
+
+ rc = false
+ end
rc
end
@@ -1040,16 +389,15 @@
publish :variable => :AbortFunction, :type => "boolean ()"
publish :function => :Abort, :type => "boolean ()"
publish :function => :SetModified, :type => "void ()"
- publish :function => :FindSysfsRoot, :type => "string ()"
publish :variable => :reipl_configuration, :type => "map "
publish :variable => :reipl_directory, :type => "string"
publish :variable => :ccw_directory, :type => "string"
publish :variable => :fcp_directory, :type => "string"
+ publish :variable => :nss_directory, :type => "string"
publish :variable => :ccw_exists, :type => "boolean"
publish :variable => :fcp_exists, :type => "boolean"
- publish :function => :SanityCheck, :type => "boolean ()"
- publish :function => :FindBootPartition, :type => "list <string> ()"
- publish :function => :ModifyReiplWithBootPartition, :type => "map (map )"
+ publish :variable => :nss_exists, :type => "boolean"
+ publish :function => :IPL_from_boot_zipl, :type => "boolean ()"
publish :function => :ReadState, :type => "map ()"
publish :function => :Read, :type => "boolean ()"
publish :function => :WriteState, :type => "boolean (map )"
continue with "q"...
Checked in at Fri May 2 15:39:47 CEST 2014 by ro
Remember to have fun...
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org