[yast-commit] r49037 - in /branches/tmp/mzugec/printer2/src: Printer.ycp overview.ycp printingvianetwork.ycp
Author: mzugec Date: Mon Jul 14 13:21:00 2008 New Revision: 49037 URL: http://svn.opensuse.org/viewcvs/yast?rev=49037&view=rev Log: use "Service" module instead of bash Modified: branches/tmp/mzugec/printer2/src/Printer.ycp branches/tmp/mzugec/printer2/src/overview.ycp branches/tmp/mzugec/printer2/src/printingvianetwork.ycp Modified: branches/tmp/mzugec/printer2/src/Printer.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/Printer.ycp?rev=49037&r1=49036&r2=49037&view=diff ============================================================================== --- branches/tmp/mzugec/printer2/src/Printer.ycp (original) +++ branches/tmp/mzugec/printer2/src/Printer.ycp Mon Jul 14 13:21:00 2008 @@ -258,9 +258,9 @@ { y2milestone( "Executing bash commandline: %1", bash_commandline ); result = (map)SCR::Execute( .target.bash_output, bash_commandline ); if( result["exit"]:9999 != 0 ) - { y2milestone( "'%1' exit code is: %2", bash_commandline, result["exit"]:9999 ); - y2milestone( "'%1' stdout is: %2", bash_commandline, result["stdout"]:"" ); - y2milestone( "'%1' stderr is: %2", bash_commandline, result["stderr"]:"" ); + { y2warning( "'%1' exit code is: %2", bash_commandline, result["exit"]:9999 ); + y2warning( "'%1' stdout is: %2", bash_commandline, result["stdout"]:"" ); + y2warning( "'%1' stderr is: %2", bash_commandline, result["stderr"]:"" ); return false; } return true; Modified: branches/tmp/mzugec/printer2/src/overview.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/overview.ycp?rev=49037&r1=49036&r2=49037&view=diff ============================================================================== --- branches/tmp/mzugec/printer2/src/overview.ycp (original) +++ branches/tmp/mzugec/printer2/src/overview.ycp Mon Jul 14 13:21:00 2008 @@ -38,6 +38,7 @@ import "Wizard_hw"; import "Confirm"; import "Printer"; +import "Service"; include "printer/helps.ycp"; @@ -91,7 +92,7 @@ ) { return `abort; } - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups start" ) ) + if( ! Service::Start("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). @@ -382,7 +383,7 @@ { continue; } // Do a restart to be safe: - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups restart" ) ) + if( ! Service::Restart("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). Modified: branches/tmp/mzugec/printer2/src/printingvianetwork.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mzugec/printer2/src/printingvianetwork.ycp?rev=49037&r1=49036&r2=49037&view=diff ============================================================================== --- branches/tmp/mzugec/printer2/src/printingvianetwork.ycp (original) +++ branches/tmp/mzugec/printer2/src/printingvianetwork.ycp Mon Jul 14 13:21:00 2008 @@ -36,6 +36,7 @@ import "Printer"; import "Popup"; import "Report"; +import "Service"; include "printer/helps.ycp"; @@ -307,7 +308,7 @@ ) { continue; } - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups stop" ) ) + if( ! Service::Stop("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). @@ -323,7 +324,7 @@ ) { continue; } - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups restart" ) ) + if( ! Service::Restart("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). @@ -346,7 +347,7 @@ ) { continue; } - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups start" ) ) + if( ! Service::Start("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). @@ -400,7 +401,7 @@ ) { continue; } - if( ! Printer::ExecuteBashCommand( "/etc/init.d/cups start" ) ) + if( ! Service::Start("cups") ) { Report::Error( // Message of a Report::Error. // Only a simple message because this error does not happen on a normal system // (i.e. a system which is not totally broken or totally messed up). -- 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