-
Notifications
You must be signed in to change notification settings - Fork 2
send when
Ryan Newington edited this page May 27, 2016
·
1 revision
An async-command can contain multiple <send-when>
elements which define a string to send to the standard input of the remote server when an expected string is received from the server.
XML Attribute | Description | Allowed Values |
---|---|---|
expect | The string to wait for before sending the command | A valid value declaration |
timeout | The amount of time to wait for the expected text to appear | An integer value greater than zero |
The inner text of the element contains the value to send. Value declarations are supported for some operation types. See [value declarations | value declaration#supported operations] for details. | |
If the timeout period elapses without the expected text appearing, the operation fails and an error is reported back to FIM for the object. |
<send-when expect="$ " timeout="5">/usr/local/bin/sudo /usr/bin/passwd {dn:$1}</send-when>
<send-when expect="New Password: " timeout="5">{newpassword}</send-when>
The example above sends the change password command to the server, waits for "New Password: " to appear, and then sends the new password.