summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakub <jakub>1999-10-04 16:33:32 +0000
committerjakub <jakub>1999-10-04 16:33:32 +0000
commit6b1bc260c3f21f05874046edcf1d70d75e993a3e (patch)
treee69408882272b5d4f9d931497d4ce03e8edc8721
parent8c0c9dfa0c3da692ab5e5f094921d14075e36e5d (diff)
downloadanaconda-6b1bc260c3f21f05874046edcf1d70d75e993a3e.tar.gz
anaconda-6b1bc260c3f21f05874046edcf1d70d75e993a3e.tar.xz
anaconda-6b1bc260c3f21f05874046edcf1d70d75e993a3e.zip
Find out reasonable default for MBR. Fix the MBR radio buttons.
-rw-r--r--textw/silo.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/textw/silo.py b/textw/silo.py
index fc3344602..3a28f7283 100644
--- a/textw/silo.py
+++ b/textw/silo.py
@@ -48,8 +48,8 @@ class SiloWindow:
(bootpart, boothd) = todo.silo.getSiloOptions()
format = "/dev/%-11s %s%*s"
- str1 = _("First sector of boot partition")
- str2 = _("Master Boot Record (MBR)")
+ str1 = _("Master Boot Record (MBR)")
+ str2 = _("First sector of boot partition")
str3 = _("Create PROM alias `linux'")
str4 = _("Set default PROM boot device")
len1 = len(str1) + 17
@@ -57,8 +57,12 @@ class SiloWindow:
len3 = len(str3)
len4 = len(str4)
lenmax = max((len1, len2, len3, len4))
- rc1 = SingleRadioButton (format % (bootpart, str1, lenmax - len1, ""), None, 1 )
- rc2 = SingleRadioButton (format % (boothd, str2, lenmax - len2, ""), rc1)
+ if todo.silo.getSiloMbrDefault() == 'mbr':
+ dflt = 1
+ else:
+ dflt = 0
+ rc1 = SingleRadioButton (format % (boothd, str1, lenmax - len1, ""), None, dflt )
+ rc2 = SingleRadioButton (format % (bootpart, str2, lenmax - len2, ""), rc1, 1 - dflt)
prompath = todo.silo.disk2PromPath(bootpart)
if prompath and len(prompath) > 0 and todo.silo.hasAliases():