Skip to content

Commit

Permalink
warn user if no location chosen for stage 1 (bnc#885208)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jul 8, 2014
1 parent 53dffe5 commit dd53b60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/BootGRUB2.rb
Expand Up @@ -25,6 +25,7 @@ module Yast
import "Arch"
import "Storage"
import "BootCommon"
import "HTML"

class BootGRUB2Class < GRUB2Base
def main
Expand Down Expand Up @@ -224,6 +225,13 @@ def urlLocationSummary
line << "</li>"
end

if ["boot_root", "boot_boot", "boot_mbr"].none? { |loc| BootCommon.globals[loc] == "true" }
# no location chosen, so warn user that it is problem unless he is sure
msg = _("Warning: No location for bootloader stage1 selected." \
"Unless you know what you are doing please select above location.")
line << "<li>" << HTML.Colorize(msg, "red") << "</li>"
end

line << "</ul>"

# TRANSLATORS: title for list of location proposals
Expand Down

0 comments on commit dd53b60

Please sign in to comment.