Author: fehr
Date: Mon Jul 2 18:09:31 2007
New Revision: 39124
URL: http://svn.opensuse.org/viewcvs/yast?rev=39124&view=rev
Log:
make sure util-linux-crypto gets installed and boot.crypto is insserved (#279900)
Modified:
trunk/storage/package/yast2-storage.changes
trunk/storage/storage/src/include/custom_part_lib.ycp
trunk/storage/storage/src/inst_prepdisk.ycp
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=39124&r1=39123&r2=39124&view=diff
==============================================================================
--- trunk/storage/package/yast2-storage.changes (original)
+++ trunk/storage/package/yast2-storage.changes Mon Jul 2 18:09:31 2007
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jul 2 18:08:11 CEST 2007 - fehr@suse.de
+
+- make sure util-linux-crypto gets installed and boot.crypto is
+ insserved (#279900)
+
+-------------------------------------------------------------------
Mon Jul 02 18:09:18 CEST 2007 - aschnell@suse.de
- handle old encryption types with cryptsetup (bug #258222)
Modified: trunk/storage/storage/src/include/custom_part_lib.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/custom_part_lib.ycp?rev=39124&r1=39123&r2=39124&view=diff
==============================================================================
--- trunk/storage/storage/src/include/custom_part_lib.ycp (original)
+++ trunk/storage/storage/src/include/custom_part_lib.ycp Mon Jul 2 18:09:31 2007
@@ -931,6 +931,7 @@
new["mountby"] = `device;
new["label"] = "";
new["ori_label"] = "";
+ Package::InstallAll( ["util-linux-crypto"] );
}
}
if( ret == `fs_options )
Modified: trunk/storage/storage/src/inst_prepdisk.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/inst_prepdisk.ycp?rev=39124&r1=39123&r2=39124&view=diff
==============================================================================
--- trunk/storage/storage/src/inst_prepdisk.ycp (original)
+++ trunk/storage/storage/src/inst_prepdisk.ycp Mon Jul 2 18:09:31 2007
@@ -135,7 +135,10 @@
destproc = Installation::scr_destdir+"/sys";
SCR::Execute (.target.mount, ["sysfs", destproc], "-t sysfs");
}
-
+ else
+ {
+ Storage::FinishInstall();
+ }
Storage::UpdateTargetMap();
SCR::Write( .target.ycp, Storage::SaveDumpPath("targetMap_pe"),
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=39124&r1=39123&r2=39124&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Mon Jul 2 18:09:31 2007
@@ -4278,16 +4278,24 @@
pl = add( pl, "yast2-storage-evms" );
}
boolean need_quota = false;
+ boolean need_crypt = false;
foreach( string k, map e, tg,
``{
if( size(filter( map p, e["partitions"]:[],
``(FileSystems::HasQuota(p))))>0 )
need_quota = true;
+ if( size(filter( map p, e["partitions"]:[],
+ ``(p["enc_type"]:`none != `none)))>0 )
+ need_crypt = true;
});
if( need_quota )
{
pl = add( pl, "quota" );
}
+ if( need_crypt )
+ {
+ pl = add( pl, "util-linux-crypto" );
+ }
y2milestone( "AddPackageList ret %1", pl );
return( pl );
}
@@ -5502,65 +5510,83 @@
global define void FinishInstall()
``{
+ y2milestone( "FinishInstall initial:%1", Stage::initial() );
map tg = GetTargetMap();
- HandleModulesOnBoot( tg );
- list evms = GetUsedEvmsDisks( tg );
- y2milestone( "FinishInstall evms %1", evms );
- if( size(evms)>0 )
+ if( Stage::initial() )
{
- string cmd = "cd / && /sbin/insserv /etc/init.d/boot.evms";
- y2milestone( "FinishInstall cmd %1", cmd );
- map bo = (map)SCR::Execute (.target.bash_output, cmd );
- y2milestone( "FinishInstall bo %1", bo );
- }
- list<string> nonevms = GetUsedRealDisks( tg );
- nonevms = filter( string d, nonevms, ``(!contains( evms, d )));
- nonevms = maplist( string d, nonevms, ``(substring(d,5)));
- y2milestone( "FinishInstall nonevms %1", nonevms );
- nonevms = (list<string>)merge( nonevms, maplist( map p, GetPrepBoot(tg),
- ``(substring(p["device"]:"",5))));
- y2milestone( "FinishInstall nonevms %1", nonevms );
- if( size(nonevms)>0 && SCR::Read( .target.size, "/etc/evms.conf" )>=0 )
- {
- map evmsconf = $[];
- AsciiFile::ReadFile( evmsconf, "/etc/evms.conf" );
- boolean found = false;
- integer i = 1;
- string regex1 = "^[ \t]*activate[ \t]*\\{";
- string regex2 = "^[ \t]*exclude[ \t]*=";
- string regex3 = "^[ \t]*\\}";
- while( i<=AsciiFile::NumLines(evmsconf) && !found )
- {
- found = regexpmatch( evmsconf["l",i,"line"]:"", regex1 );
- i = i+1;
- }
- found = false;
- boolean found2 = false;
- while( i<=AsciiFile::NumLines(evmsconf) && !found && !found2)
+ HandleModulesOnBoot( tg );
+ list evms = GetUsedEvmsDisks( tg );
+ y2milestone( "FinishInstall evms %1", evms );
+ if( size(evms)>0 )
{
- found = regexpmatch( evmsconf["l",i,"line"]:"", regex2 );
- found2 = regexpmatch( evmsconf["l",i,"line"]:"", regex3 );
- if( found )
- {
- string co = evmsconf["l",i,"line"]:"";
- integer pos = search( co, "[" );
- if( pos!=nil )
- co = substring( co, pos+1 );
- pos = search( co, "]" );
- if( pos!=nil )
- co = substring( co, 0, pos );
- y2milestone( "FinishInstall co = \"%1\"", co );
- string li = "\texclude = [ " + co + mergestring( nonevms, " " ) +
- " ]";
- y2milestone( "FinishInstall li = %1", li );
- evmsconf["l",i,"line"] = li;
- evmsconf["l",i,"buildline"] = false;
- AsciiFile::RewriteFile( evmsconf, "/etc/evms.conf" );
+ string cmd = "cd / && /sbin/insserv /etc/init.d/boot.evms";
+ y2milestone( "FinishInstall cmd %1", cmd );
+ map bo = (map)SCR::Execute (.target.bash_output, cmd );
+ y2milestone( "FinishInstall bo %1", bo );
+ }
+ list<string> nonevms = GetUsedRealDisks( tg );
+ nonevms = filter( string d, nonevms, ``(!contains( evms, d )));
+ nonevms = maplist( string d, nonevms, ``(substring(d,5)));
+ y2milestone( "FinishInstall nonevms %1", nonevms );
+ nonevms = (list<string>)merge( nonevms, maplist( map p, GetPrepBoot(tg),
+ ``(substring(p["device"]:"",5))));
+ y2milestone( "FinishInstall nonevms %1", nonevms );
+ if( size(nonevms)>0 && SCR::Read( .target.size, "/etc/evms.conf" )>=0 )
+ {
+ map evmsconf = $[];
+ AsciiFile::ReadFile( evmsconf, "/etc/evms.conf" );
+ boolean found = false;
+ integer i = 1;
+ string regex1 = "^[ \t]*activate[ \t]*\\{";
+ string regex2 = "^[ \t]*exclude[ \t]*=";
+ string regex3 = "^[ \t]*\\}";
+ while( i<=AsciiFile::NumLines(evmsconf) && !found )
+ {
+ found = regexpmatch( evmsconf["l",i,"line"]:"", regex1 );
+ i = i+1;
+ }
+ found = false;
+ boolean found2 = false;
+ while( i<=AsciiFile::NumLines(evmsconf) && !found && !found2)
+ {
+ found = regexpmatch( evmsconf["l",i,"line"]:"", regex2 );
+ found2 = regexpmatch( evmsconf["l",i,"line"]:"", regex3 );
+ if( found )
+ {
+ string co = evmsconf["l",i,"line"]:"";
+ integer pos = search( co, "[" );
+ if( pos!=nil )
+ co = substring( co, pos+1 );
+ pos = search( co, "]" );
+ if( pos!=nil )
+ co = substring( co, 0, pos );
+ y2milestone( "FinishInstall co = \"%1\"", co );
+ string li = "\texclude = [ " + co +
+ mergestring( nonevms, " " ) + " ]";
+ y2milestone( "FinishInstall li = %1", li );
+ evmsconf["l",i,"line"] = li;
+ evmsconf["l",i,"buildline"] = false;
+ AsciiFile::RewriteFile( evmsconf, "/etc/evms.conf" );
+ }
+ i = i+1;
}
- i = i+1;
}
}
- y2milestone( "FinishInstall" );
+ boolean need_crypt = false;
+ foreach( string k, map e, tg,
+ ``{
+ if( size(filter( map p, e["partitions"]:[],
+ ``(p["enc_type"]:`none != `none)))>0 )
+ need_crypt = true;
+ });
+ if( need_crypt )
+ {
+ string cmd = "cd / && /sbin/insserv /etc/init.d/boot.crypto";
+ y2milestone( "FinishInstall cmd %1", cmd );
+ map bo = (map)SCR::Execute (.target.bash_output, cmd );
+ y2milestone( "FinishInstall bo %1", bo );
+ }
+ y2milestone( "FinishInstall done" );
}
global define map GetEntryForMountpoint( string mp )
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org