Author: jsrain Date: Mon Nov 8 10:57:41 2010 New Revision: 62759 URL: http://svn.opensuse.org/viewcvs/yast?rev=62759&view=rev Log: update fstab options (bnc#649497) Modified: branches/tmp/jsrain/unattended-migration/storage/storage/src/modules/Storage.ycp Modified: branches/tmp/jsrain/unattended-migration/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jsrain/unattended-migration/storage/storage/src/modules/Storage.ycp?rev=62759&r1=62758&r2=62759&view=diff ============================================================================== --- branches/tmp/jsrain/unattended-migration/storage/storage/src/modules/Storage.ycp (original) +++ branches/tmp/jsrain/unattended-migration/storage/storage/src/modules/Storage.ycp Mon Nov 8 10:57:41 2010 @@ -5178,6 +5178,25 @@ } } +global define void UpdateFstabOptions() { + y2milestone( "UpdateFstabOptions" ); + 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 ); + string options = l["fields", 3]:""; + if (regexpmatch (options, "^\(.*,\)\?hotplug\(,.*\)\?$")) { + options = regexpsub (options, "^\(.*,\)\?hotplug\(,.*\)\?$", "\\1nofail\\2"); + AsciiFile::ChangeLineField( fstab, line, 3, options ); + } + line = line+1; + } + AsciiFile::RewriteFile( fstab, tabpath ); +} + global string HdToIseries( string input ) ``{ string ret = input; @@ -5564,6 +5583,10 @@ UpdateFstabPersistentNames(); } + + // FIXME: proper fix + UpdateFstabOptions(); + // remove EVMS // FIXME add appropriate condition if needed (does not seem so) UpdateFstabEvms2Lvm(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org