Author: jsrain Date: Wed Oct 24 17:49:01 2007 New Revision: 41557 URL: http://svn.opensuse.org/viewcvs/yast?rev=41557&view=rev Log: added firstboot_bootloader to recreate bootloader configuration Added: branches/SuSE-SLE-10-SP1-Branch/firstboot/src/firstboot_bootloader_reconfigure.ycp Modified: branches/SuSE-SLE-10-SP1-Branch/firstboot/VERSION branches/SuSE-SLE-10-SP1-Branch/firstboot/package/yast2-firstboot.changes branches/SuSE-SLE-10-SP1-Branch/firstboot/src/Makefile.am Modified: branches/SuSE-SLE-10-SP1-Branch/firstboot/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/firstboot/VERSION?rev=41557&r1=41556&r2=41557&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/firstboot/VERSION (original) +++ branches/SuSE-SLE-10-SP1-Branch/firstboot/VERSION Wed Oct 24 17:49:01 2007 @@ -1 +1 @@ -2.13.9 +2.13.10 Modified: branches/SuSE-SLE-10-SP1-Branch/firstboot/package/yast2-firstboot.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/firstboot/package/yast2-firstboot.changes?rev=41557&r1=41556&r2=41557&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/firstboot/package/yast2-firstboot.changes (original) +++ branches/SuSE-SLE-10-SP1-Branch/firstboot/package/yast2-firstboot.changes Wed Oct 24 17:49:01 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Oct 24 17:43:40 CEST 2007 - jsrain@suse.cz + +- added firstboot_bootloader to recreate bootloader configuration +- 2.13.10 + +------------------------------------------------------------------- Tue Oct 23 15:53:31 CEST 2007 - jsrain@suse.cz - initialize package callbacks, since some of the modules run Modified: branches/SuSE-SLE-10-SP1-Branch/firstboot/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/firstboot/src/Makefile.am?rev=41557&r1=41556&r2=41557&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/firstboot/src/Makefile.am (original) +++ branches/SuSE-SLE-10-SP1-Branch/firstboot/src/Makefile.am Wed Oct 24 17:49:01 2007 @@ -14,7 +14,8 @@ firstboot_keyboard.ycp \ firstboot.ycp \ firstboot_license_novell.ycp \ - firstboot_network_write.ycp + firstboot_network_write.ycp \ + firstboot_bootloader_reconfigure.ycp ynclude_DATA = \ routines.ycp Added: branches/SuSE-SLE-10-SP1-Branch/firstboot/src/firstboot_bootloader_reconfigure.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP1-Branch/firstboot/src/firstboot_bootloader_reconfigure.ycp?rev=41557&view=auto ============================================================================== --- branches/SuSE-SLE-10-SP1-Branch/firstboot/src/firstboot_bootloader_reconfigure.ycp (added) +++ branches/SuSE-SLE-10-SP1-Branch/firstboot/src/firstboot_bootloader_reconfigure.ycp Wed Oct 24 17:49:01 2007 @@ -0,0 +1,71 @@ +/** + */ +{ +import "Arch"; +import "BootCommon"; +import "Bootloader"; +import "GetInstArgs"; +import "Kernel"; +import "Mode"; + + + void SetVGAKernelParam () { + string cmldline = (string) WFM::Read (.local.string, "/proc/cmdline"); + + if (cmldline == nil) { + y2error ("No cmdline!"); + return; + } + + list <string> cmdline_args = splitstring (cmldline, " \t\n"); + + string just_parsing = ""; + + foreach (string cmdline_arg, cmdline_args, { + if (regexpmatch (cmdline_arg, "[vV][gG][aA]=.*")) { + just_parsing = cmdline_arg; + cmdline_arg = regexpsub (cmdline_arg, "[vV][gG][aA]=(.*)", "\\1"); + + if (cmdline_arg == nil || cmdline_arg == "") { + y2error ("Incorrect vga param %1", just_parsing); + break; + } else { + y2milestone ("Adjusting Kernel cmdline vga=%1", cmdline_arg); + Kernel::SetVgaType (cmdline_arg); + break; + } + } + }); + } + + +if (GetInstArgs::going_back()) + return `auto; + +Bootloader::Reset (); +if (Arch::i386 () || Arch::x86_64 ()) +{ + SetVGAKernelParam (); + y2milestone ("Setting VGA parameter to %1", Kernel::GetVgaType ()); +} + +// pretend installation +string mode = Mode::mode (); +Mode::SetMode ("installation"); + +Bootloader::Propose (); +Mode::SetMode (mode); + +if (Arch::i386 () || Arch::x86_64 ()) +{ + BootCommon::selected_location = "mbr"; + BootCommon::loader_device = BootCommon::GetBootloaderDevice (); + BootCommon::location_changed = true; + BootCommon::changed = true; +} +y2milestone ("Loader type: %1", Bootloader::getLoaderType ()); +y2milestone ("Summary: %1", Bootloader::Summary ()); +Bootloader::Write (); + +return `next; +} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org