Author: jsrain Date: Wed Sep 17 14:52:34 2008 New Revision: 51229 URL: http://svn.opensuse.org/viewcvs/yast?rev=51229&view=rev Log: solve volume device rename when switching from EVMS to LVM (fate #305007) Modified: trunk/storage/VERSION trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/modules/Storage.ycp Modified: trunk/storage/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/VERSION?rev=51229&r1=51228&r2=51229&view=diff ============================================================================== --- trunk/storage/VERSION (original) +++ trunk/storage/VERSION Wed Sep 17 14:52:34 2008 @@ -1 +1 @@ -2.17.29 +2.17.30 Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=51229&r1=51228&r2=51229&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Wed Sep 17 14:52:34 2008 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Sep 17 14:08:03 CEST 2008 - jsrain@suse.cz + +- solve volume device rename when switching from EVMS to LVM + (fate #305007) +- 2.17.30 + +------------------------------------------------------------------- Fri Sep 12 21:33:36 CEST 2008 - aschnell@suse.de - added XFS to list of default file-systems Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=51229&r1=51228&r2=51229&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Wed Sep 17 14:52:34 2008 @@ -5137,6 +5137,25 @@ AsciiFile::RewriteFile( fstab, tabpath ); } +global void UpdateFstabEvms2Lvm() { + y2milestone( "UpdateFstabEvms2Lvm migrating EVMS to LVM" ); + string tabpath = PathToDestdir( "/etc/fstab" ); + map fstab = Partitions::GetFstab( tabpath ); + integer line = 0; + string n = ""; + while( line<=AsciiFile::NumLines( fstab ) ) { + map l = AsciiFile::GetLine( fstab, line ); + n = l["fields",0]:""; + if (substring (n, 0, 15) == "/dev/evms/lvm2/") + { + n = "/dev/" + substring (n, 15); + AsciiFile::ChangeLineField( fstab, line, 0, n ); + } + line = line+1; + } + AsciiFile::RewriteFile( fstab, tabpath ); +} + global define void UpdateFstabDiskmap( map diskmap ) ``{ y2milestone( "UpdateFstabDiskmap map %1", diskmap ); @@ -5349,6 +5368,10 @@ UpdateFstabPersistentNames(); } + // remove EVMS + // FIXME add appropriate condition if needed (does not seem so) + UpdateFstabEvms2Lvm(); + map dm = BuildDiskmap( oldv ); if( size(dm)>0 ) { @@ -5415,6 +5438,14 @@ { ret = maplist( string n, ret, ``(SLES9PersistentDevNames( n ))); } + // convert EVMS names to LVM + // FIXME: add version checking, but does not seem necessary, since non-LVM + // installations will not be affected by this conversion at all + ret = maplist (string n, ret, { + if (substring (n, 0, 15) == "/dev/evms/lvm2/") + n = "/dev/" + substring (n, 15); + return n; + }); y2milestone( "GetTranslatedDevices ret %1", ret ); return( ret ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org