[yast-commit] r62317 - in /trunk/storage: package/yast2-storage.changes storage/src/modules/StorageUpdate.ycp

Author: fehr Date: Thu Jul 29 15:56:21 2010 New Revision: 62317 URL: http://svn.opensuse.org/viewcvs/yast?rev=62317&view=rev Log: replace "nofail" with "noauto" for encrypted volumes in fstab Modified: trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/modules/StorageUpdate.ycp Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.cha... ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Thu Jul 29 15:56:21 2010 @@ -3,6 +3,7 @@ - fix bug that destroys encrypted volumes when wron password is entered in read fstab dialog (#625490) +- replace "nofail" with "noauto" for encrypted volumes in fstab ------------------------------------------------------------------- Tue Jul 20 11:26:30 CEST 2010 - fehr@suse.de Modified: trunk/storage/storage/src/modules/StorageUpdate.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stora... ============================================================================== --- trunk/storage/storage/src/modules/StorageUpdate.ycp (original) +++ trunk/storage/storage/src/modules/StorageUpdate.ycp Thu Jul 29 15:56:21 2010 @@ -288,6 +288,35 @@ AsciiFile::RewriteFile( crtab, tabpath ); } +void UpdateFstabCryptNofail() + { + y2milestone( "UpdateFstabCryptNofail called" ); + string tabpath = Storage::PathToDestdir( "/etc/fstab" ); + map fstab = Partitions::GetFstab( tabpath ); + integer line = 0; + boolean update = false; + while( line<=AsciiFile::NumLines( fstab ) ) + { + map l = AsciiFile::GetLine( fstab, line ); + if( search( l["fields",0]:"", "/dev/mapper/cr_" )==0 ) + { + list<string> ls = splitstring( l["fields",3]:"", "," ); + ls = filter( string s, ls, ``(s!="noauto")); + if( size(filter( string s, ls, ``(s=="nofail")))==0 ) + { + ls = add( ls, "nofail" ); + AsciiFile::ChangeLineField( fstab, line, 3, + mergestring( ls, "," )); + update = true; + } + } + line = line+1; + } + if( update ) + { + AsciiFile::RewriteFile( fstab, tabpath ); + } + } /** * Updates fstab on disk @@ -388,6 +417,8 @@ bo = (map)SCR::Execute (.target.bash_output, cmd ); y2milestone( "Update bo %1", bo ); } + if( oldv["major"]:0<11 || (oldv["major"]:0==11 && oldv["minor"]:0<=2)) + UpdateFstabCryptNofail(); // set flag -> it indicates that Update was already called called_update = true; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn.opensuse.org