YaST2 Developers Documentation: YaST Repair

YaST Repair

OSRExecute.ycp

This module has an unstable interface.

Imports

  • Mode
  • OSRCommon
  • OSRLogFile
  • OSRProgress

Global Functions

global CommandOutput (path environment, string commandline) -> boolean

Executes the given commandline in a bash and writes all execution-information to the standard log file. This function returns all output from the commandline in a result map. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash_output, "rpm -q lilo") resp. WFM::(.local.bash_output, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.

API function.

Parameters:
environment The environment-path, has to be .local.bash_output or .target.bash_output (or .local.bash resp. .target.bash)
commandline
global CommandProgress (path environment, string commandline, string progress_file) -> boolean

Executes the given commandline in a bash and writes all execution-information to the specified logfile. Use these functions instead of directly calling the SCR or WFM agents (e.g. SCR::Execute(.target.bash, "rpm -q lilo") resp. WFM::(.local.bash, "rpm -q -r /mnt lilo")) to be sure to support logging correctly.

API function.

Parameters:
environment
commandline
progress_file
Return value:
Success
Example

	OSRExecute::CommandProgress (.local.bash, "rpm -qi -r /mnt/ lilo",
		"/tmp/progress_file");

   $ cat /tmp/osr.log
   *** /bin/rpm -qi lilo ***
   Name      : lilo         Relocations: (not relocateable)
   Version   : 21.6              Vendor: SuSE GmbH, Nuernberg, Germany
   [...]
   SuSE series: a
   *** exit code: 0 ***
global Command (path environment, string commandline) -> boolean

Wrapper to CommandProgress, with the use of current log file

Parameters:
environment
commandline