...
Stop script execution example with "rsh":
Include Page | ||||
---|---|---|---|---|
|
...
Display output example from the "vmlist" command:
...
Script example:
In this example, we 'll use "ssh
" to display the guest "uptime
" and the result of the "uname -nr
" command (name of the node + release number of the operating system)
The last 2 lines containing the RETVAL variable are mandatory
...
class | commandline |
---|
...
To create the script, the following commands were executed to copy the provided example to the one that will be used:
|
|
#
# Parameter $1: contains full path to cfg file
#
case "$1"
in
/charon/pluto.cfg)
ssh -o ConnectTimeout=2 pluto "uptime|cut -f1 -d',';echo ' - ';uname -nr" 2>/dev/null
RETVAL=$?
;;
*)
echo "Invalid parameter '$1'"
RETVAL=1
;;
esac
echo "==RETVAL=${RETVAL}=="
exit ${RETVAL}
|
Example file provided (contains example for Tru64 and OpenVMS):
...
Include Page | ||||
---|---|---|---|---|
|
...