Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49775 - in /trunk/bootloader/src: clients/bootloader_proposal.ycp config/bootloader.rnc modules/Bootloader.ycp routines/dialogs.ycp routines/misc.ycp
  • From: juhliarik@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 13:42:22 -0000
  • Message-id: <20080806134222.D0D3429FBD@xxxxxxxxxxxxxxxx>
Author: juhliarik
Date: Wed Aug 6 15:42:22 2008
New Revision: 49775

URL: http://svn.opensuse.org/viewcvs/yast?rev=49775&view=rev
Log:
- added better detection of NFS boot device
- added better detection of EVMS - do not install bootlaoder (fate
#305007)

M bootloader/src/clients/bootloader_proposal.ycp
M bootloader/src/config/bootloader.rnc
M bootloader/src/modules/Bootloader.ycp
M bootloader/src/routines/dialogs.ycp
* added better detection of NFS boot device
M bootloader/src/routines/misc.ycp
* added better detection of EVMS

Modified:
trunk/bootloader/src/clients/bootloader_proposal.ycp
trunk/bootloader/src/config/bootloader.rnc
trunk/bootloader/src/modules/Bootloader.ycp
trunk/bootloader/src/routines/dialogs.ycp
trunk/bootloader/src/routines/misc.ycp

Modified: trunk/bootloader/src/clients/bootloader_proposal.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader_proposal.ycp?rev=49775&r1=49774&r2=49775&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader_proposal.ycp (original)
+++ trunk/bootloader/src/clients/bootloader_proposal.ycp Wed Aug 6 15:42:22
2008
@@ -124,22 +124,16 @@

//F#300779 - Install diskless client (NFS-root)
//kokso: bootloader will not be installed
-
- map dev = $[];
- if ((BootCommon::BootPartitionDevice != "") &&
(BootCommon::BootPartitionDevice != nil))
- dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);
- else
- dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice);
-
- if (dev["disk"]:"" == "/dev/nfs")
+ string device = BootCommon::getBootDisk();
+ if (device == "/dev/nfs")
{
-
+
y2milestone("bootlader_proposal::MakeProposal -> Boot partition is
nfs type, bootloader will not be installed.");
y2milestone("Type of BootPartitionDevice: %1", dev["disk"]:"");
return ret;

}
- y2milestone("Type of BootPartitionDevice: %1", dev["disk"]:"");
+ y2milestone("Type of BootPartitionDevice: %1", device);

//F#300779 - end


Modified: trunk/bootloader/src/config/bootloader.rnc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/config/bootloader.rnc?rev=49775&r1=49774&r2=49775&view=diff
==============================================================================
--- trunk/bootloader/src/config/bootloader.rnc (original)
+++ trunk/bootloader/src/config/bootloader.rnc Wed Aug 6 15:42:22 2008
@@ -90,6 +90,9 @@
element xen {text}? &
element xen_append {text}? &
element noverifyroot { "true" | "false" }? &
+ element makeactive { "true" | "false" }? &
+ element remap { "true" | "false" }? &
+ element configfile {text}? &
element image {text}?
}
kernel_parameters = element kernel_parameters { text }

Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=49775&r1=49774&r2=49775&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Wed Aug 6 15:42:22 2008
@@ -293,12 +293,8 @@
// F#300779 - Install diskless client (NFS-root)
// kokso: additional warning that root partition is nfs type ->
bootloader will not be installed

- map dev = $[];
- if ((BootCommon::BootPartitionDevice != "") &&
(BootCommon::BootPartitionDevice != nil))
- dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);
- else
- dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice);
- if (dev["disk"]:"" == "/dev/nfs")
+ string device = BootCommon::getBootDisk();
+ if (device == "/dev/nfs")
{

ret = add (ret, _("The boot partition is of type NFS. Bootloader
cannot be installed."));
@@ -537,13 +533,9 @@

//F#300779 - Install diskless client (NFS-root)
//kokso: bootloader will not be installed
+ string device = BootCommon::getBootDisk();

- map dev = $[];
- if ((BootCommon::BootPartitionDevice != "") &&
(BootCommon::BootPartitionDevice != nil))
- dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);
- else
- dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice);
- if (dev["disk"]:"" == "/dev/nfs")
+ if (device == "/dev/nfs")
{
y2milestone("Bootloader::Write() -> Boot partition is nfs type,
bootloader will not be installed.");
return ret;
@@ -679,13 +671,9 @@

// F#300779 - Install diskless client (NFS-root)
// kokso: bootloader will not be installed
+ string device = BootCommon::getBootDisk();

- map dev = $[];
- if ((BootCommon::BootPartitionDevice != "") &&
(BootCommon::BootPartitionDevice != nil))
- dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);
- else
- dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice);
- if (dev["disk"]:"" == "/dev/nfs")
+ if (device == "/dev/nfs")
{
y2milestone("Bootloader::Write() -> Boot partition is nfs type,
bootloader will not be installed.");
return ret;

Modified: trunk/bootloader/src/routines/dialogs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/dialogs.ycp?rev=49775&r1=49774&r2=49775&view=diff
==============================================================================
--- trunk/bootloader/src/routines/dialogs.ycp (original)
+++ trunk/bootloader/src/routines/dialogs.ycp Wed Aug 6 15:42:22 2008
@@ -27,8 +27,6 @@
import "Wizard";
import "Bootloader";
import "Stage";
-//F#300779 - Install diskless client (NFS-root)
-import "Storage";

include "bootloader/routines/popups.ycp";
include "bootloader/routines/section_widgets.ycp";
@@ -91,13 +89,9 @@

//F#300779 - Install diskless client (NFS-root)
//kokso: additional warning that root partition is nfs type -> bootloader
will not be installed
+ string device = BootCommon::getBootDisk();

- map dev = $[];
- if ((BootCommon::BootPartitionDevice != "") &&
(BootCommon::BootPartitionDevice != nil))
- dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice);
- else
- dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice);
- if ((dev["disk"]:"" == "/dev/nfs") && (Mode::installation()))
+ if ((device == "/dev/nfs") && (Mode::installation()))
{
Popup::Message(_("The boot partition is of type NFS. Bootloader cannot
be installed."));
y2milestone("dialogs::MainDialog() -> Boot partition is nfs type,
bootloader will not be installed.");

Modified: trunk/bootloader/src/routines/misc.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/misc.ycp?rev=49775&r1=49774&r2=49775&view=diff
==============================================================================
--- trunk/bootloader/src/routines/misc.ycp (original)
+++ trunk/bootloader/src/routines/misc.ycp Wed Aug 6 15:42:22 2008
@@ -41,6 +41,7 @@

global map<string, integer> Md2Partitions (string md_device);
global void DetectDisks ();
+ global string getBootPartition();

/**
* return printable name of bootloader
@@ -1558,7 +1559,7 @@
}
// EVMS
// FIXME: type detection by name deprecated
- else if (search (BootPartitionDevice, "/dev/evms/") == 0)
+ else if (search (getBootPartition(), "/dev/evms/") == 0)
{
y2milestone ("Cannot install bootloader on EVMS");
return false;
@@ -1701,13 +1702,14 @@

}

-/** FATE #303548 - Grub: limit device.map to devices detected by BIOS Int 13
- * Function select boot device - disk
- *
- * @return string name of boot device - disk
+/**
+ * Function return boot device it means
+ * return boot partition or root partition if boot partition deosn't exist
+ * function return "" if boot partition or root partition is not defined
(autoyast)
+ * @return string name of boot device (partition)
*/

-global string getBootDisk()
+global string getBootPartition()
{
string boot_device = "";
if (BootCommon::BootPartitionDevice != "")
@@ -1715,6 +1717,19 @@
else if (BootCommon::RootPartitionDevice != "")
boot_device = BootCommon::RootPartitionDevice;

+ return boot_device;
+}
+
+/** FATE #303548 - Grub: limit device.map to devices detected by BIOS Int 13
+ * Function select boot device - disk
+ *
+ * @return string name of boot device - disk
+ */
+
+global string getBootDisk()
+{
+ string boot_device = getBootPartition();
+
if (boot_device == "")
{
y2milestone("BootPartitionDevice and RootPartitionDevice are
empty");

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages