This document provides instructions on how to resolve the stty: : no such device or address (or similar) error message when running Unix scripts on an Agent.
Cisco recommends that you have an existing Tidal Agent 3.0 or higher installation.
The information in this document is based on Tidal Windows Agent version 3.0 or higher.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
When you run a script on a Unix Agent, stty: : no such device or address, stty: standard input: Inappropriate ioctl for device, or similar errors are encountered. Typically, the script completes successfully. However, this error is returned in the job output.
If the script uses the stty command, these errors are received. The easiest solution is to contain these statements in an if statement that only executes them if the script is being run interactively (that is, from a command line).
if [ `tty | grep -ci not` -eq 0 ]
stty erase \^\h kill \^u intr \^c # workstations
stty echoe echok ixon ixoff -ixany
stty erase \^\?
stty erase \^h kill \^u intr \^c
Simply put, you cannot run stty commands in a non-interactive environment (similar to the issues encountered when running scripts as cron jobs).
Note: The above example was developed and tested on a Solaris 8 system, and may require modification depending on the shell you are running. This code is provided only as an example.