122. .reports_parse

SCR Agent for interfacing with (shell) commands of the target system and reading/writing files.

122.1. Description

The target-agent is used for various actions on the target system. The Execute Interface can be used to execute some predefined commands like mount, umount, mkdir, remove, modprobe ... or arbitrary commands using the bash, bash_output or bash_background. The Read and Write interface can be used to access the target filesystem, most prominent reading or writing whole files using the "string" subpath. For more information see the agent's own documentation.

Access type: read/write/execute

File Name: /usr/share/YaST2/scrconf/reports_parse.scr

See: libscr man bash source/y2a_system/doc/systemagent.txt

122.2. Usage

Example 73. 

Execute (.target.bash, "uname -a")
(0)
Execute (.target.bash_output, "uname -a")
(
  $[
    "exit":0,
    "stderr":"",
    "stdout":"Linux steiner 2.2.18 #1 Fri Jan 19 22:10:35 GMT 2001 i686 unknown\n"
  ]
)
Read(.target.dir, "/")
(["usr", "tmp", "floppy", "var", "root", "opt", "home", "etc", ...])
Write(.target.string, "/tmp/target.1", "Some Test\n")
(true)
Read(.target.string, "/tmp/target.1")
("Some Test\n")