Skip to content

Commit

Permalink
Removed also Arch.s390 dependencies from options.
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Feb 29, 2016
1 parent 68b3d8e commit 141ea3f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/include/security/widgets.rb
Expand Up @@ -263,18 +263,20 @@ def initialize_security_widgets(include_target)
}
end

def console_shutdown_options
# ComboBox value
options = [["ignore", _("Ignore")]]

# ComboBox value, not shown in s390 architecture
options << ["reboot", _("Reboot")] if !Arch.s390

# ComboBox value
options << ["halt", _("Halt")]
def boot_option_labels
{
"ignore" => _("Ignore"),
"reboot" => _("Reboot"),
"halt" => _("Halt")
}
end

options
# EOF
def console_shutdown_options
::Security::CtrlAltDelConfig.options.map do |opt|
[opt, boot_option_labels[opt]]
end
end

# EOF
end
end
8 changes: 8 additions & 0 deletions src/lib/security/ctrl_alt_del_config.rb
Expand Up @@ -44,6 +44,14 @@ def default
Yast::Arch.s390 ? "halt" : "reboot"
end

def options
options = ["ignore", "reboot", "halt"]

options.delete("reboot") if Yast::Arch.s390

options
end

def current
return current_systemd if systemd?
return current_inittab if inittab?
Expand Down

0 comments on commit 141ea3f

Please sign in to comment.