Skip to content

Commit

Permalink
Changes based on code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Sep 18, 2020
1 parent cef0b9c commit 1c4074c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/autoinstall/clients/inst_autoinit.rb
Expand Up @@ -150,7 +150,8 @@ def run
# an ask-list is declared redoing the import and write of the pre-scripts as
# many times as needed.
def autoinit_scripts
# pre-scripts should be already imported
# Pre-Scripts
Yast::AutoinstScripts.Import(Yast::Profile.current["scripts"] || {})
Yast::AutoinstScripts.Write("pre-scripts", false)

# Reread Profile in case it was modified in pre-script
Expand All @@ -173,17 +174,17 @@ def autoinit_scripts
break if ret == :not_found
end

# reimport scripts, for the case <ask> has changed them
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", {}))
Yast::AutoinstScripts.Import(Yast::Profile.current.fetch("scripts", {}))
end

# Checking profile for unsupported sections.
Expand Down

0 comments on commit 1c4074c

Please sign in to comment.