[yast-commit] r52630 - in /trunk/autoinstallation: doc/CreateProfileDetails.xml doc/examples/example.generalOptions.xml package/autoyast2.changes src/clients/inst_autoconfigure.ycp src/schema/general.rnc

Author: ug Date: Tue Oct 28 15:50:02 2008 New Revision: 52630 URL: http://svn.opensuse.org/viewcvs/yast?rev=52630&view=rev Log: <wait> section added to <general> section Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml trunk/autoinstallation/doc/examples/example.generalOptions.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/clients/inst_autoconfigure.ycp trunk/autoinstallation/src/schema/general.rnc Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfil... ============================================================================== --- trunk/autoinstallation/doc/CreateProfileDetails.xml (original) +++ trunk/autoinstallation/doc/CreateProfileDetails.xml Tue Oct 28 15:50:02 2008 @@ -124,6 +124,12 @@ </listitem> </itemizedlist> </para> + <para> + The wait section was invented with openSUSE 11.1 and SLES11. You can let AutoYaST sleep before and after each module during the second stage. + You can run scripts and/or you can pass a value (in seconds) for AutoYaST to sleep. In the example above AutoYaST will sleep for 15 seconds (10+5) before + the network configuration happens and 10 seconds (3+7) after the network configuration is done. The scripts in the example don't really make a lot of sense + because you could pass that value as "time" value too but I think you get how scripts in the wait section work now. + </para> <note> <title>Change starting from SUSE Linux 10.1/SLES10</title> <para> Modified: trunk/autoinstallation/doc/examples/example.generalOptions.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/examples/exa... ============================================================================== --- trunk/autoinstallation/doc/examples/example.generalOptions.xml (original) +++ trunk/autoinstallation/doc/examples/example.generalOptions.xml Tue Oct 28 15:50:02 2008 @@ -20,6 +20,39 @@ <proposals config:type="list"> <!-- since 11.1 --> <proposal>partitions_proposal</proposal> </proposals> + <wait> <!-- sinc 11.1 / SLES11 --> + <pre-modules config:type="list"> + <module> + <name>networking</name> + <sleep> + <time config:type="integer">10</time> + <feedback config:type="boolean">true</feedback> + </sleep> + <script> + <source> + sleep 5 + </source> + <debug config:type="boolean">false</debug> + </script> + </module> + </pre-modules> + <post-modules config:type="list"> + <module> + <name>networking</name> + <sleep> + <time config:type="integer">3</time> + <feedback config:type="boolean">true</feedback> + </sleep> + <script> + <source> + sleep 7 + </source> + <debug config:type="boolean">false</debug> + </script> + </module> + </post-modules> + </wait> + </general> Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast... ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Tue Oct 28 15:50:02 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Tue Oct 28 15:49:02 CET 2008 - ug@suse.de + +- <wait> section added to <general> section + +------------------------------------------------------------------- Mon Oct 27 15:52:44 CET 2008 - ug@suse.de - added kdump support Modified: trunk/autoinstallation/src/clients/inst_autoconfigure.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/clients/inst... ============================================================================== --- trunk/autoinstallation/src/clients/inst_autoconfigure.ycp (original) +++ trunk/autoinstallation/src/clients/inst_autoconfigure.ycp Tue Oct 28 15:50:02 2008 @@ -13,6 +13,8 @@ import "Profile"; import "AutoinstScripts"; + import "AutoinstConfig"; + import "Popup"; import "Wizard"; import "Call"; import "Y2ModuleConfig"; @@ -51,6 +53,28 @@ return; } + define void processWait( string resource, string stage ) { + foreach( map process, Profile::current["general","wait",stage]:[], ``{ + if( process["name"]:"" == resource ) { + if( haskey( process, "sleep" ) ) { + if( process["sleep","feedback"]:false == true ) + Popup::ShowFeedback( "", sformat( _("processing resource %1"), resource)); + sleep( 1000*process["sleep","time"]:0 ); + if( process["sleep","feedback"]:false == true ) + Popup::ClearFeedback(); + } + if( haskey( process, "script" ) ) { + string debug = ( process["script","debug"]:true ? "-x" : "" ); + string scriptName = sformat("%1-%2.log", stage,resource); + string scriptPath = sformat("%1/%2", AutoinstConfig::scripts_dir, scriptName); + string executionString = sformat("/bin/sh %1 %2 2&> %3/%4.log ", debug, scriptPath, AutoinstConfig::logs_dir, scriptName ); + SCR::Execute (.target.bash, executionString); + } + } + }); + return; + } + // Help text for last dialog of base installation string help_text = _("<p> Please wait while the system is being configured. @@ -142,8 +166,10 @@ else logStep( sformat (_("Not Configuring %1"), p)); + processWait( p, "pre-modules" ); Call::Function(module_auto, ["Import", eval(result) ]); Call::Function(module_auto, ["Write"]); + processWait( p, "post-modules" ); } else if (d["X-SuSE-YaST-AutoInstDataType"]:"map" == "map") { @@ -153,7 +179,9 @@ else logStep( sformat (_("Not Configuring %1"), p)); //Call::Function(module_auto, ["Import", eval(Profile::current[resource]:$[]) ]); + processWait( resource, "pre-modules" ); Call::Function(module_auto, ["Write"]); + processWait( resource, "post-modules" ); } else { @@ -164,7 +192,9 @@ y2milestone("Calling auto client with: %1", eval(Profile::current[resource]:[])); //Call::Function(module_auto, ["Import", eval(Profile::current[resource]:[]) ]); + processWait( resource, "pre-modules" ); Call::Function(module_auto, ["Write"]); + processWait( resource, "post-modules" ); } } else @@ -182,7 +212,9 @@ /* online update */ if( Profile::current["software","do_online_update"]:false == true ) { + processWait( "do_online_update", "pre-modules" ); symbol online_update_ret = (symbol)Call::Function("do_online_update_auto", ["Write"]); + processWait( "do_online_update", "post-modules" ); if( online_update_ret == `reboot ) { map script = $[ "filename":"zzz_reboot", "source":"shutdown -r now" ]; AutoinstScripts::init = add( AutoinstScripts::init, script ); Modified: trunk/autoinstallation/src/schema/general.rnc URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/schema/gener... ============================================================================== --- trunk/autoinstallation/src/schema/general.rnc (original) +++ trunk/autoinstallation/src/schema/general.rnc Tue Oct 28 15:50:02 2008 @@ -10,6 +10,36 @@ element proposals { LIST, element proposal { text }* + }? & + element wait { + element pre-modules { + LIST, + element module { + element name { text }? & + element sleep { + element time { INTEGER }? & + element feedback { BOOLEAN }? + }? & + element script { + element debug { BOOLEAN }? & + element source { text }? + } + }* + }? & + element post-modules { + LIST, + element module { + element name { text }? & + element sleep { + element time { INTEGER }? & + element feedback { BOOLEAN }? + }? & + element script { + element debug { BOOLEAN }? & + element source { text }? + } + }* + }? }? } ask-list = element ask-list { LIST, ask* } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ug@svn.opensuse.org