Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41559 - in /trunk/firstboot: package/yast2-firstboot.changes src/Makefile.am src/firstboot_bootloader_reconfigure.ycp
  • From: jsrain@xxxxxxxxxxxxxxxx
  • Date: Wed, 24 Oct 2007 15:52:06 -0000
  • Message-id: <20071024155206.AF9BF2D1F1@xxxxxxxxxxxxxxxx>
Author: jsrain
Date: Wed Oct 24 17:52:06 2007
New Revision: 41559

URL: http://svn.opensuse.org/viewcvs/yast?rev=41559&view=rev
Log:
added firstboot_bootloader to recreate bootloader configuration


Added:
trunk/firstboot/src/firstboot_bootloader_reconfigure.ycp
Modified:
trunk/firstboot/package/yast2-firstboot.changes
trunk/firstboot/src/Makefile.am

Modified: trunk/firstboot/package/yast2-firstboot.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/package/yast2-firstboot.changes?rev=41559&r1=41558&r2=41559&view=diff
==============================================================================
--- trunk/firstboot/package/yast2-firstboot.changes (original)
+++ trunk/firstboot/package/yast2-firstboot.changes Wed Oct 24 17:52:06 2007
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Oct 24 17:43:40 CEST 2007 - jsrain@xxxxxxx
+
+- added firstboot_bootloader to recreate bootloader configuration
+
+-------------------------------------------------------------------
Tue Oct 23 15:53:31 CEST 2007 - jsrain@xxxxxxx

- initialize package callbacks, since some of the modules run

Modified: trunk/firstboot/src/Makefile.am
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/Makefile.am?rev=41559&r1=41558&r2=41559&view=diff
==============================================================================
--- trunk/firstboot/src/Makefile.am (original)
+++ trunk/firstboot/src/Makefile.am Wed Oct 24 17:52:06 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: trunk/firstboot/src/firstboot_bootloader_reconfigure.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/firstboot_bootloader_reconfigure.ycp?rev=41559&view=auto
==============================================================================
--- trunk/firstboot/src/firstboot_bootloader_reconfigure.ycp (added)
+++ trunk/firstboot/src/firstboot_bootloader_reconfigure.ycp Wed Oct 24
17:52:06 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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages