Skip to content

Commit

Permalink
Merge pull request #28 from gabi2/master
Browse files Browse the repository at this point in the history
don't show YaST iscsi-client during AutoYaST installation (bnc #878061)
  • Loading branch information
gabi2 committed Jun 12, 2014
2 parents 28bd361 + 5298cae commit f4f4626
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
7 changes: 7 additions & 0 deletions package/yast2-iscsi-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jun 11 14:50:01 CEST 2014 - gs@suse.de

- allow AutoYaST installation on iSCSI disks with BIOS boot support
(bnc #878061)
- 3.1.12

-------------------------------------------------------------------
Tue Jun 10 15:00:18 CEST 2014 - gs@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-iscsi-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-iscsi-client
Version: 3.1.11
Version: 3.1.12
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
19 changes: 13 additions & 6 deletions src/clients/inst_iscsi-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def main
Yast.import "PackagesProposal"
Yast.import "Installation"
Yast.import "String"
Yast.import "Mode"
Yast.include self, "iscsi-client/wizards.rb"

# main ui function
Expand All @@ -70,13 +71,10 @@ def main
ModuleLoading.Load("iscsi_tcp", "", "", "", false, true)
IscsiClientLib.LoadOffloadModules

# start iscsid daemon
# start iscsid daemon and service 'iscsiuio'
IscsiClientLib.startIScsid

IscsiClientLib.autoLogOn
# run dialog
@ret = MainSequence()
Builtins.y2debug("MainSequence ret=%1", @ret)
# try auto login to target
auto_login = IscsiClientLib.autoLogOn

# add package open-iscsi and iscsiuio to installed system
iscsi_packages = ["open-iscsi", "iscsiuio"]
Expand All @@ -88,6 +86,15 @@ def main
iscsi_packages
)

if Mode.autoinst && auto_login
Builtins.y2milestone("Autoinstallation - IscsiClient module finished")
return :next
end

# run dialog
@ret = MainSequence()
Builtins.y2debug("MainSequence ret=%1", @ret)

# Finish
Builtins.y2milestone("IscsiClient module finished")
Builtins.y2milestone("----------------------------------------")
Expand Down
13 changes: 8 additions & 5 deletions src/modules/IscsiClientLib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -925,14 +925,17 @@ def setStartupStatus(status)
end

def autoLogOn
ret = true
Builtins.y2milestone("begin of autoLogOn function")
if Ops.greater_than(Builtins.size(getiBFT), 0)
Builtins.y2milestone(
"Autologin into iBFT : %1",
SCR.Execute(path(".target.bash_output"), GetAdmCmd("-m fw -l"))
)
result = Convert.to_map(SCR.Execute(path(".target.bash_output"),
GetAdmCmd("-m fw -l")))
if result["exit"] || 255 != 0
ret = false
end
log.info "Autologin into iBFT : #{result}"
end
true
ret
end


Expand Down

0 comments on commit f4f4626

Please sign in to comment.