Author: juhliarik Date: Thu Jan 22 14:03:35 2009 New Revision: 54899 URL: http://svn.opensuse.org/viewcvs/yast?rev=54899&view=rev Log: added fix for problem with autoinstallation and detection of NFS (bnc #448950) Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes?rev=54899&r1=54898&r2=54899&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes (original) +++ branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes Thu Jan 22 14:03:35 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Jan 22 14:01:07 CET 2009 - juhliarik@suse.cz + +- added fix for problems with autoinstallation and "/" on NFS + (bnc # 448950) + +------------------------------------------------------------------- Wed Oct 1 10:05:20 CEST 2008 - juhliarik@suse.cz - added fix for cloning sections (bnc #429525) Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp?rev=54899&r1=54898&r2=54899&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp Thu Jan 22 14:03:35 2009 @@ -97,27 +97,19 @@ ret = $[ "raw_proposal" : Bootloader::Summary ()]; - // F#300779 - Install diskless client (NFS-root) - // kokso: additional warning that root partition is nfs type -> bootloader will not be installed - - // B#355332 - Bootloader doesn't work if root partitions is like nfs - - map dev = $[]; - - if ((BootCommon::BootPartitionDevice != "") && (BootCommon::BootPartitionDevice != nil)) - dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice); - else - dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice); - - if (dev["disk"]:"" == "/dev/nfs") + // bnc #448950 - autoyast: the boot partition is of type NFS, bootloader cannot be installed + // F#300779 - Install diskless client (NFS-root) + // kokso: bootloader will not be installed + 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"]:""); + y2milestone("Type of BootPartitionDevice: %1", device); return ret; } - y2milestone("Type of BootPartitionDevice: %1", dev["disk"]:""); + y2milestone("Type of BootPartitionDevice: %1", device); // F#300779 - end if (Bootloader::getLoaderType () == "") Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp?rev=54899&r1=54898&r2=54899&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp Thu Jan 22 14:03:35 2009 @@ -279,17 +279,11 @@ global define list<string> Summary () { list<string> ret =[]; - // F#300779 - Install diskless client (NFS-root) - // kokso: additional warning that root partition is nfs type -> bootloader will not be installed - - // B#355332 - Bootloader doesn't work if root partitions is like nfs - - map dev = $[]; - if ((BootCommon::BootPartitionDevice != "") && (BootCommon::BootPartitionDevice != nil)) - dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice); - else - dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice); - if (dev["disk"]:"" == "/dev/nfs") + // bnc #448950 - autoyast: the boot partition is of type NFS, bootloader cannot be installed + // F#300779 - Install diskless client (NFS-root) + // kokso: bootloader will not be installed + string device = BootCommon::getBootDisk(); + if (device == "/dev/nfs") { ret = add (ret, _("The boot partition is of type NFS. Bootloader cannot be installed.")); @@ -524,19 +518,11 @@ return ret; } - + // bnc #448950 - autoyast: the boot partition is of type NFS, bootloader cannot be installed // F#300779 - Install diskless client (NFS-root) - // kokso: additional warning that root partition is nfs type -> bootloader will not be installed - - // B#355332 - Bootloader doesn't work if root partitions is like nfs - - map dev = $[]; - if ((BootCommon::BootPartitionDevice != "") && (BootCommon::BootPartitionDevice != nil)) - dev = Storage::GetDiskPartition(BootCommon::BootPartitionDevice); - else - dev = Storage::GetDiskPartition(BootCommon::RootPartitionDevice); - - if (dev["disk"]:"" == "/dev/nfs") + // kokso: bootloader will not be installed + string device = BootCommon::getBootDisk(); + if (device == "/dev/nfs") { y2milestone("Bootloader::Write() -> Boot partition is nfs type, bootloader will not be installed."); return ret; Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp?rev=54899&r1=54898&r2=54899&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp Thu Jan 22 14:03:35 2009 @@ -86,18 +86,11 @@ "tab", `Right ("adv_button") ); + // bnc #448950 - autoyast: the boot partition is of type NFS, bootloader cannot be installed // F#300779 - Install diskless client (NFS-root) // kokso: additional warning that root partition is nfs type -> bootloader will not be installed - - // B#355332 - Bootloader doesn't work if root partitions is like nfs - - 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())) + string device = BootCommon::getBootDisk(); + 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: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp?rev=54899&r1=54898&r2=54899&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp Thu Jan 22 14:03:35 2009 @@ -1491,7 +1491,52 @@ } } +/** + * 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 getBootPartition() +{ + string boot_device = ""; + if (BootCommon::BootPartitionDevice != "") + boot_device = BootCommon::BootPartitionDevice; + 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"); + return boot_device; + } + map p_dev = Storage::GetDiskPartition (boot_device); + + string boot_disk_device = p_dev["disk"]:""; + + if ((boot_disk_device != "") && (boot_disk_device != nil)) + { + y2milestone("Boot device - disk: %1", boot_disk_device); + return boot_disk_device; + } + + y2milestone("Finding boot disk failed!"); + return ""; +} } //end of include -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org