[yast-commit] r51794 - in /trunk/yast2: library/runlevel/src/Service.ycp library/runlevel/testsuite/tests/RunInitScript.out library/runlevel/testsuite/tests/RunInitScript.ycp package/yast2.changes
Author: mzugec Date: Thu Oct 2 14:32:26 2008 New Revision: 51794 URL: http://svn.opensuse.org/viewcvs/yast?rev=51794&view=rev Log: Service - log output in case of error Modified: trunk/yast2/library/runlevel/src/Service.ycp trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.out trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.ycp trunk/yast2/package/yast2.changes Modified: trunk/yast2/library/runlevel/src/Service.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/runlevel/src/Service.ycp?rev=51794&r1=51793&r2=51794&view=diff ============================================================================== --- trunk/yast2/library/runlevel/src/Service.ycp (original) +++ trunk/yast2/library/runlevel/src/Service.ycp Thu Oct 2 14:32:26 2008 @@ -278,9 +278,13 @@ */ global define integer RunInitScript (string name, string param) { y2milestone("Running service initscript %1 %2", name, param); - return (integer) SCR::Execute (.target.bash, - sformat ("%2/%1 %3", name, init_d, param), - $[ "TERM" : "raw"]); + string command = sformat ("%2/%1 %3", name, init_d, param); + map<string, any> output=(map<string, any>)SCR::Execute (.target.bash_output, + command, $[ "TERM" : "raw"]); + + if (output["exit"]:-1!=0) + y2error("Error while running initscript %1 :\n%2", command, output); + return output["exit"]:-1; } Modified: trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.out URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.out?rev=51794&r1=51793&r2=51794&view=diff ============================================================================== --- trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.out (original) +++ trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.out Thu Oct 2 14:32:26 2008 @@ -1,2 +1,2 @@ -Execute .target.bash "/etc/init.d/aaa start" $["TERM":"raw"] 0 +Execute .target.bash_output "/etc/init.d/aaa start" $["TERM":"raw"] $["exit":0] Return 0 Modified: trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.ycp?rev=51794&r1=51793&r2=51794&view=diff ============================================================================== --- trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.ycp (original) +++ trunk/yast2/library/runlevel/testsuite/tests/RunInitScript.ycp Thu Oct 2 14:32:26 2008 @@ -3,6 +3,6 @@ import "Service"; TEST (``(Service::RunInitScript ("aaa", "start")), [$[], $[], $[ - "target" : $[ "bash" : 0 ] + "target" : $[ "bash" : 0, "bash_output" : $["exit":0] ] ]], nil); } Modified: trunk/yast2/package/yast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=51794&r1=51793&r2=51794&view=diff ============================================================================== --- trunk/yast2/package/yast2.changes (original) +++ trunk/yast2/package/yast2.changes Thu Oct 2 14:32:26 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Thu Oct 2 14:31:38 CEST 2008 - mzugec@suse.de + +- Service - log output in case of error + +------------------------------------------------------------------- Thu Oct 2 11:31:35 CEST 2008 - kmachalkova@suse.cz - Hostname.ycp: Improved FQDN lookup - read /etc/HOSTNAME and use -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org