Mailinglist Archive: yast-commit (535 mails)

< Previous Next >
[yast-commit] r41569 - in /trunk/storage: package/yast2-storage.changes storage/src/modules/Storage.ycp
  • From: fehr@xxxxxxxxxxxxxxxx
  • Date: Thu, 25 Oct 2007 13:08:49 -0000
  • Message-id: <20071025130849.82EA72D232@xxxxxxxxxxxxxxxx>
Author: fehr
Date: Thu Oct 25 15:08:49 2007
New Revision: 41569

URL: http://svn.opensuse.org/viewcvs/yast?rev=41569&view=rev
Log:
- force "partitions" in DEVICE line of mdadm.conf duing update if
device names changed (#331604)

Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/modules/Storage.ycp

Modified: trunk/storage/package/yast2-storage.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=41569&r1=41568&r2=41569&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Thu Oct 25 15:08:49 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Oct 25 15:07:31 CEST 2007 - fehr@xxxxxxx
+
+- force "partitions" in DEVICE line of mdadm.conf duing update if
+ device names changed (#331604)
+
+-------------------------------------------------------------------
Tue Oct 23 12:50:10 CEST 2007 - fehr@xxxxxxx

- make StorageDevice initializion delayed (#335582)

Modified: trunk/storage/storage/src/modules/Storage.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=41569&r1=41568&r2=41569&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Thu Oct 25 15:08:49 2007
@@ -5149,7 +5149,7 @@

global define void UpdateFstabDiskmap( map diskmap )
``{
- y2milestone( "UpdateFstabdiskmap map %1", diskmap );
+ y2milestone( "UpdateFstabDiskmap map %1", diskmap );
string tabpath = PathToDestdir( "/etc/fstab" );
map fstab = Partitions::GetFstab( tabpath );
integer line = 0;
@@ -5181,6 +5181,30 @@
AsciiFile::RewriteFile( crtab, tabpath );
}

+global define void UpdateMdadm()
+ ``{
+ y2milestone( "UpdateMdadm" );
+ string cpath = PathToDestdir( "/etc/mdadm.conf" );
+ map file = $[];
+ AsciiFile::SetComment( file, "^[ \t]*#" );
+ AsciiFile::ReadFile( file, cpath );
+ integer line = 0;
+ boolean changed = false;
+ while( line<=AsciiFile::NumLines( file ) )
+ {
+ if( search( file["l",line,"line"]:"", "DEVICE" )!=nil &&
+ search( file["l",line,"line"]:"", "/dev/" )!=nil )
+ {
+ changed = true;
+ file["l",line,"line"] = "DEVICE partitions";
+ y2milestone( "UpdateMdadm %1", file["l",line]:$[] );
+ }
+ line = line+1;
+ }
+ if( changed )
+ AsciiFile::RewriteFile( file, cpath );
+ }
+
global define void UpdateCryptoType()
``{
y2milestone( "UpdateCryptoType" );
@@ -5327,6 +5351,7 @@
if( size(dm)>0 )
{
UpdateFstabDiskmap( dm );
+ UpdateMdadm();
}
if( oldv["major"]:0<9 || (oldv["major"]:0==9 && oldv["minor"]:0<=2))
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages