I don't think rsh works that way..at least not to my experience. In my quick testing, rsh returns 0 if it successfuly runs a command on the filer, whether or not it's even a valid command, it succeeded to do what you asked. It returns 1 if the rsh fails, such as permission denied, connection timed out, etc.
Feel free to let me know if someone has seen differently. You may want to capture the output and parse it to check if the command succeeded or failed...just a thought.
-- Adam Fox NetApp Professional Services, NC adamfox@netapp.com
-----Original Message----- From: Brian Tao [mailto:taob@risc.org] Sent: Sunday, November 05, 2000 2:46 PM To: toasters@mathworks.com Subject: rsh return code
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. -- Brian Tao (BT300, taob@risc.org) "Though this be madness, yet there is method in't"