The problem with looking to get a return code is that there are really 2 programs running at the same time (rsh and the actual remotely executed program). The way rsh is designed the return code that you will see is coming from rsh. It's just a measurement of whether rsh was able to establish a connection to the remote system or not. In a nutshell, rsh does return 0 or 1 based on success or failure but rsh really has no view of the results of the program on the remote system. To do this, you need a more robust messaging capability like you might find in middleware products MQ, Tibco, etc, and these products can't run on filers. Another alternative is to capture and parse the output from the snap create command with the script that is calling rsh to create the snapshot.
Rick Hulsey Southwest Airlines 2425 Wyman Mail Stop 4DC Dallas, Tx., 75235 rick.hulsey@wnco.com (214) 792-7188 Office (972) 880-6882 Cell (800) 915-3747 Pager
Brian Tao taob@risc.org 11/05/00 01:45PM >>>
Probably a dumb question, but I just had a gigantic Sunday brunch buffet, so my brain is halfway into a food coma. ;-) Is it possible to have rsh return 0 or 1 depending on the success of a command executed on a filer? For instance, I want my backup scripts to kick off a "snap create" before they proceed, but I want to check the exit status of the rsh so I have a chance to abort and notify the operator if the snapshot is not created.