Skip to content

Commit

Permalink
set forceboot after adding an additional product
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed May 31, 2016
1 parent d304232 commit 0d31e60
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions library/control/src/modules/WorkflowManager.rb
Expand Up @@ -39,6 +39,9 @@

module Yast
class WorkflowManagerClass < Module

include Yast::Logger

def main
Yast.import "UI"
Yast.import "Pkg"
Expand All @@ -56,6 +59,9 @@ def main
Yast.import "String"
Yast.import "XML"
Yast.import "Report"
Yast.import "Mode"
Yast.import "AutoinstGeneral"


#
# This API uses some new terms that need to be explained:
Expand Down Expand Up @@ -1143,6 +1149,22 @@ def UpdateProductInfo(update_file, _filename)
ProductFeatures.SetSection(section, sect)
end

if Mode.auto &&
AutoinstGeneral.mode.has_key? "forceboot" &&
!Yast::ProductFeatures.GetBooleanFeature("globals", "kexec_reboot") !=
AutoinstGeneral.mode["forceboot"]
# This entry can be set by the AutoYaST configuration file and
# should not be reset by any other product desciption file.
# bnc#981434
log.info( "Taking \"kexec_reboot\" from AutoYaST configuration " \
"\"forceboot\" #{AutoinstGeneral.mode["forceboot"]}" )
ProductFeatures.SetBooleanFeature(
"globals",
"kexec_reboot",
!AutoinstGeneral.mode["forceboot"]
)
end

# merging 'clone_modules'
addon_clone = Ops.get_list(update_file, "clone_modules", [])
ProductControl.clone_modules = Convert.convert(
Expand Down

0 comments on commit 0d31e60

Please sign in to comment.