[yast-commit] r52785 - in /trunk/bootloader/src: grub/helps.ycp modules/BootCommon.ycp modules/BootSupportCheck.ycp modules/Bootloader.ycp

Author: juhliarik Date: Fri Oct 31 12:49:05 2008 New Revision: 52785 URL: http://svn.opensuse.org/viewcvs/yast?rev=52785&view=rev Log: added better checking of proposal and support of "none" bootloader also corrected any typo Modified: trunk/bootloader/src/grub/helps.ycp trunk/bootloader/src/modules/BootCommon.ycp trunk/bootloader/src/modules/BootSupportCheck.ycp trunk/bootloader/src/modules/Bootloader.ycp Modified: trunk/bootloader/src/grub/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/grub/helps.ycp?rev... ============================================================================== --- trunk/bootloader/src/grub/helps.ycp (original) +++ trunk/bootloader/src/grub/helps.ycp Fri Oct 31 12:49:05 2008 @@ -143,7 +143,7 @@ "PCRKernelHelp" : _("<p><b>PCR Index of Kernel</b> is Platform Configuration Register for kernel</p>"), "PCRInitrdHelp" : - _("<p><b>PCR Index of Inird</b> is Platform Configuration Register for initrd</p>"), + _("<p><b>PCR Index of Initrd</b> is Platform Configuration Register for initrd</p>"), "PCRChainloaderHelp" : _("<p><b>PCR Index of Chainloader</b> is Platform Configuration Register for chainloader</p>"), "PCRXenHelp" : Modified: trunk/bootloader/src/modules/BootCommon.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon... ============================================================================== --- trunk/bootloader/src/modules/BootCommon.ycp (original) +++ trunk/bootloader/src/modules/BootCommon.ycp Fri Oct 31 12:49:05 2008 @@ -822,31 +822,20 @@ BootCommon::UpdateAppend (); BootCommon::UpdateGfxMenu (); } - + boolean ret = true; + string bl = getLoaderType (false); + + InitializeLibrary (init, bl); + if (bl == "none") return true; - InitializeLibrary (init, bl); // FATE: #110038: Serial console // check and add console key with value for sections addConsole(); - /* - list<map<string,string> > sects = maplist (map<string,any> s, sections, { - return (map<string,string>) - filter (string k, any v, s, { return is (v, string); }); - }); - */ - /* it is done - // convert root device names in sections to the device names indicated by - // "mountby" - - sects = maplist (map<string,string> s, sects, { - s["root"] = BootCommon::Dev2MountByDev(s["root"]:""); - return s; - }); - */ + // FIXME: give mountby information to perl-Bootloader (or define some // better interface), so that perl-Bootloader can use mountby device names // for these devices instead. Tracked in bug #248162. Modified: trunk/bootloader/src/modules/BootSupportCheck.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootSuppor... ============================================================================== --- trunk/bootloader/src/modules/BootSupportCheck.ycp (original) +++ trunk/bootloader/src/modules/BootSupportCheck.ycp Fri Oct 31 12:49:05 2008 @@ -73,14 +73,36 @@ boolean KnownLoader () { if (! contains (["grub", "elilo", "ppc", "zipl", "none"], Bootloader::getLoaderType ())) { - y2error ("Unknown bootloader: %1", Bootloader::getLoaderType ()); - AddNewProblem (sformat (_("Unknown bootloader: %1"), Bootloader::getLoaderType ())); + + if (Bootloader::getLoaderType () != "lilo") + { + y2error ("Unknown bootloader: %1", Bootloader::getLoaderType ()); + AddNewProblem (sformat (_("Unknown bootloader: %1"), Bootloader::getLoaderType ())); + } else { + y2error ("LILO bootloader: %1", Bootloader::getLoaderType ()); + AddNewProblem (_("LILO bootloader is not supported")); + } return false; } return true; } /** + * Check if elilo is supported + */ +boolean checkElilo() +{ + string cmd = "modprobe efivars"; + map ret = (map)SCR::Execute (.target.bash_output, cmd); + if (ret["exit"]:1 == 0) + return true; + else + return false; +} + + + +/** * Check that bootloader matches current hardware */ boolean CorrectLoaderType () { @@ -95,11 +117,11 @@ if (Arch::ia64() && lt == "elilo") return true; if (Arch::i386() || Arch::x86_64()) { - if (false) {// FIXME: check for EFI + if (checkElilo()) { if (lt == "elilo") return true; } else { - if (lt == "grub") + if ((lt == "grub") || (lt == "lilo")) return true; } } @@ -127,8 +149,8 @@ { if (num > 3) { - y2error ("Partitin number > 3 is being used for booting with GPT partition table"); - AddNewProblem (_("Partitin number > 3 is being used for booting with GPT partition table")); + y2error ("Partition number > 3 is being used for booting with GPT partition table"); + AddNewProblem (_("Partition number > 3 is being used for booting with GPT partition table")); return false; } } @@ -168,17 +190,18 @@ { if (p["device"]:"" == boot_device) { - if (p["raid_type"]:"" == "raid0") + if ((p["raid_type"]:"" != "raid1") && (p["type"]:nil ==`sw_raid)) { - AddNewProblem (_("The boot device is on raid0.")); - y2error("The boot device: %1 is on raid0", boot_device); + AddNewProblem (sformat(_("The boot device is on raid type: %1."), p["raid_type"]:"")); + y2error("The boot device: %1 is on raid type: %2", boot_device, p["raid_type"]:""); result = false; break; } else { found_boot = true; - y2milestone("The boot device: %1 is not on raid0", boot_device); + y2milestone("The boot device: %1 is on raid: %2", boot_device, p["raid_type"]:""); //break; } + // check if /boot directory is on supported filesystem if (p["used_fs"]:nil == `xfs) { AddNewProblem (_("The /boot directory is on an XFS filesystem")); Modified: trunk/bootloader/src/modules/Bootloader.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader... ============================================================================== --- trunk/bootloader/src/modules/Bootloader.ycp (original) +++ trunk/bootloader/src/modules/Bootloader.ycp Fri Oct 31 12:49:05 2008 @@ -1033,7 +1033,7 @@ } - y2milestone("name of default section for zipl: %1", def_section_name); + y2milestone("name of default section: %1", def_section_name); return def_section_name; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
juhliarik@svn.opensuse.org