Skip to content

Commit

Permalink
Import initial configuration from the profile when modified by pre-sc…
Browse files Browse the repository at this point in the history
…ripts
  • Loading branch information
teclator committed Sep 21, 2020
1 parent dacc972 commit a4baa7f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/clients/inst_autoinit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,19 @@ def autoinit_scripts
break if ret == :not_found
end

# reimport scripts, for the case <ask> has changed them
AutoinstScripts.Import(Ops.get_map(Profile.current, "scripts", {}))
import_initial_config if modified_profile?
:ok
end

# Imports the initial profile configuration (report, general and
# pre-scripts sections)
def import_initial_config
# reimport scripts, for the case <ask> has changed them
Yast::AutoinstScripts.Import(Yast::Profile.current.fetch("scripts", {}))
Yast::Report.Import(Yast::Profile.current.fetch("report", {}))
Yast::AutoinstGeneral.Import(Yast::Profile.current.fetch("general", {}))
end

# Checking profile for unsupported sections.
def check_unsupported_profile_sections
unsupported_sections = Y2ModuleConfig.unsupported_profile_sections
Expand Down Expand Up @@ -259,8 +267,7 @@ def processProfile
Progress.NextStage
Progress.Title(_("Initial Configuration"))
Builtins.y2milestone("Initial Configuration")
Report.Import(Profile.current.fetch("report",{}))
AutoinstGeneral.Import(Profile.current.fetch("general",{}))
import_initial_config

#
# Copy the control file for easy access by user to a pre-defined
Expand Down

0 comments on commit a4baa7f

Please sign in to comment.