Skip to content

Commit

Permalink
Merge pull request #471 from yast/SLE-15-GA-1112769
Browse files Browse the repository at this point in the history
Sle 15 ga 1112769
  • Loading branch information
schubi2 committed Nov 2, 2018
2 parents 5f95cb7 + 90a0331 commit 85b95dd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
8 changes: 8 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Nov 2 12:57:05 CET 2018 - schubi@suse.de

- Writing security settings in first AY installation stage.
So other modules (e.g. users) can rely on these settings now.
(bnc#1112769)
- 4.0.64

-------------------------------------------------------------------
Mon Oct 22 08:25:08 WEST 2018 - igonzalezsosa@suse.com

Expand Down
4 changes: 3 additions & 1 deletion package/autoyast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
%endif

Name: autoyast2
Version: 4.0.64
Version: 4.0.65
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down Expand Up @@ -65,6 +65,8 @@ Requires: yast2 >= 4.0.60
Requires: yast2-core
Requires: yast2-country >= 3.1.13
Requires: yast2-ntp-client >= 4.0.1
# Moving security module to first installation stage
Requires: yast2-security >= 4.0.1
Requires: yast2-network >= 3.1.145
Requires: yast2-schema
Requires: yast2-transfer >= 2.21.0
Expand Down
31 changes: 25 additions & 6 deletions src/clients/inst_autosetup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def main
_("Execute pre-install user scripts"),
_("Configure General Settings "),
_("Set up language"),
_("Configure security settings"),
_("Create partition plans"),
_("Configure Bootloader"),
_("Registration"),
Expand All @@ -69,6 +70,7 @@ def main
_("Executing pre-install user scripts..."),
_("Configuring general settings..."),
_("Setting up language..."),
_("Configuring security settings"),
_("Creating partition plans..."),
_("Configuring Bootloader..."),
_("Registering the system..."),
Expand All @@ -89,7 +91,7 @@ def main
)


return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)


Progress.NextStage
Expand All @@ -104,7 +106,7 @@ def main

return :abort if readModified == :abort

return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)

#
# Partitioning and Storage
Expand Down Expand Up @@ -254,7 +256,7 @@ def main
end


return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)

# moved here from autoinit for fate #301193
# needs testing
Expand All @@ -276,6 +278,12 @@ def main

Progress.NextStage

# Importing security settings
autosetup_security
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)

Progress.NextStage

probe_storage if modified_profile? || dasd_or_zfcp

if Profile.current["partitioning_advanced"] && !Profile.current["partitioning_advanced"].empty?
Expand Down Expand Up @@ -309,7 +317,7 @@ def main
# So the software selection is aware and can manage packages
# needed by the bootloader (bnc#876161)

return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)
Progress.NextStage

return :abort unless WFM.CallFunction(
Expand All @@ -320,7 +328,7 @@ def main
# Registration
# FIXME: There is a lot of duplicate code with inst_autoupgrade.

return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)
Progress.NextStage

# The configuration_management has to be called before software selection.
Expand All @@ -341,7 +349,7 @@ def main

# Software

return :abort if Popup.ConfirmAbort(:painless) if UI.PollInput == :abort
return :abort if UI.PollInput == :abort && Popup.ConfirmAbort(:painless)

Progress.NextStage

Expand Down Expand Up @@ -454,6 +462,17 @@ def autosetup_users
end
end

# Import security settings from profile
def autosetup_security
security_config = Profile.current["security"]
if security_config
# Do not start it in second installation stage again.
# Writing will be called in inst_finish.
Profile.remove_sections("security")
Call.Function("security_auto", ["Import", security_config])
end
end

# Add YaST2 packages dependencies
def add_yast2_dependencies
keys = Profile.current.keys.select do |k|
Expand Down

0 comments on commit 85b95dd

Please sign in to comment.