[yast-commit] r40685 - in /trunk/storage: VERSION package/yast2-storage.changes storage/src/modules/Storage.ycp
Author: fehr Date: Mon Sep 3 11:36:11 2007 New Revision: 40685 URL: http://svn.opensuse.org/viewcvs/yast?rev=40685&view=rev Log: - call insserv or insser -r for boot.{md,lvm,dmraid} as needed (#303857) - version 2.15.24 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=40685&r1=40684&r2=40685&view=diff ============================================================================== --- trunk/storage/VERSION (original) +++ trunk/storage/VERSION Mon Sep 3 11:36:11 2007 @@ -1 +1 @@ -2.15.23 +2.15.24 Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=40685&r1=40684&r2=40685&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Mon Sep 3 11:36:11 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Sep 3 11:34:26 CEST 2007 - fehr@suse.de + +- call insserv or insser -r for boot.{md,lvm,dmraid} as needed (#303857) +- version 2.15.24 + +------------------------------------------------------------------- Thu Aug 30 11:37:39 CEST 2007 - fehr@suse.de - call insserv for boot.crypto during update from <=10.2 (#305105) Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=40685&r1=40684&r2=40685&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Mon Sep 3 11:36:11 2007 @@ -5593,6 +5593,22 @@ return( ret ); } +void CallInsserv( boolean on, string name ) + { + y2milestone( "CallInsserv on:%1 name:%2", on, name ); + string scrname = "/etc/init.d/boot." + name; + if( SCR::Read( .target.size, scrname )>0 ) + { + string cmd = "cd / && /sbin/insserv "; + if( !on ) + cmd = cmd + "-r "; + cmd = cmd + scrname; + y2milestone( "CallInsserv cmd %1", cmd ); + map bo = (map)SCR::Execute (.target.bash_output, cmd ); + y2milestone( "CallInsserv bo %1", bo ); + } + } + global define void FinishInstall() ``{ y2milestone( "FinishInstall initial:%1", Stage::initial() ); @@ -5603,12 +5619,7 @@ list evms = GetUsedEvmsDisks( tg ); y2milestone( "FinishInstall evms %1", evms ); if( size(evms)>0 ) - { - 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 ); - } + CallInsserv( true, "evms" ); list<string> nonevms = GetUsedRealDisks( tg ); nonevms = filter( string d, nonevms, ``(!contains( evms, d ))); nonevms = maplist( string d, nonevms, ``(substring(d,5))); @@ -5658,19 +5669,30 @@ } } boolean need_crypt = false; + boolean need_md = false; + boolean need_lvm = false; + boolean need_dmraid = false; foreach( string k, map e, tg, ``{ if( size(filter( map p, e["partitions"]:[], ``(p["enc_type"]:`none != `none)))>0 ) need_crypt = true; + if( e["type"]:`CT_UNKNOWN==`CT_MD && size(e["partitions"]:[])>0 ) + need_md = true; + if( e["type"]:`CT_UNKNOWN==`CT_LVM ) + need_lvm = true; + if( e["type"]:`CT_UNKNOWN==`CT_DMRAID ) + need_dmraid = true; }); + y2milestone( "FinishInstall need crypto:%1 md:%2 lvm:%3 dmraid:%4", + need_crypt, need_md, need_lvm, need_dmraid ); + string cmd = ""; + map bo = $[]; 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 ); - } + CallInsserv( true, "crypto" ); + CallInsserv( need_md, "md" ); + CallInsserv( need_lvm, "lvm" ); + CallInsserv( need_dmraid, "dmraid" ); y2milestone( "FinishInstall done" ); } -- 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