Author: aschnell Date: Thu Nov 20 14:07:22 2008 New Revision: 53477 URL: http://svn.opensuse.org/viewcvs/yast?rev=53477&view=rev Log: - added warning for use of kernel device names in /etc/fstab during update (bnc #429019) Modified: trunk/update/VERSION trunk/update/package/yast2-update.changes trunk/update/src/modules/RootPart.ycp Modified: trunk/update/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/VERSION?rev=53477&r1=53476&r2=53477&view=diff ============================================================================== --- trunk/update/VERSION (original) +++ trunk/update/VERSION Thu Nov 20 14:07:22 2008 @@ -1 +1 @@ -2.17.12 +2.17.13 Modified: trunk/update/package/yast2-update.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/package/yast2-update.changes?rev=53477&r1=53476&r2=53477&view=diff ============================================================================== --- trunk/update/package/yast2-update.changes (original) +++ trunk/update/package/yast2-update.changes Thu Nov 20 14:07:22 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Nov 20 14:05:59 CET 2008 - aschnell@suse.de + +- added warning for use of kernel device names in /etc/fstab + during update (bnc #429019) +- 2.17.13 + +------------------------------------------------------------------- Wed Nov 19 17:32:01 CET 2008 - locilka@suse.cz - Added checking for incomplete installation when such system is Modified: trunk/update/src/modules/RootPart.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/update/src/modules/RootPart.ycp?rev=53477&r1=53476&r2=53477&view=diff ============================================================================== --- trunk/update/src/modules/RootPart.ycp (original) +++ trunk/update/src/modules/RootPart.ycp Thu Nov 20 14:07:22 2008 @@ -751,6 +751,32 @@ return (var_device_fstab != nil); } + + boolean FstabUsesKernelDeviceNameForHarddisks(list<map> fstab) + { + // We just want to check the use of kernel device names for hard + // disks. Not for e.g. BIOS RAIDs or LVM logical volumes. + + // Since we are looking at device names of hard disks that may no + // longer exist all we have at hand is the name. + + return find(map line, fstab, { + + string spec = line["spec"]:"error"; + + if (regexpmatch(spec, "^/dev/sd[a-z]+[0-9]+$")) + return true; + if (regexpmatch(spec, "^/dev/hd[a-z]+[0-9]+$")) + return true; + if (regexpmatch(spec, "^/dev/dasd[a-z]+[0-9]+$")) + return true; + + return false; + + }) != nil; + } + + define string MountVarIfRequired (list <map> fstab, string root_device_current); /** @@ -772,7 +798,7 @@ fstab = (list<map>) SCR::Read (.etc.fstab); crtab = (list<map>) SCR::Read (.etc.cryptotab); } - + Update::GetProductName(); boolean fstab_has_separate_var = FstabHasSeparateVar (fstab); @@ -784,6 +810,15 @@ y2milestone ("No separate /var partition found"); } + if (FstabUsesKernelDeviceNameForHarddisks(fstab)) + { + y2warning("fstab on %1 uses kernel device name for hard disks", root_device_current); + Popup::Warning(sformat(_("Some partitions in the system on %1 are mounted by kernel-device name. This is +not reliable for the update since kernel-device names are unfortunately not +persistent. It is strongly recommended to start the old system and change the +mount-by method to any other method for all partitions."), root_device_current)); + } + y2milestone ("fstab: %1", fstab); fstab = TranslateFsOrCryptoTab (fstab, "spec", "spec_old"); y2milestone ("fstab: (translated) %1", fstab); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org