SUMMARY: starting automount from another machine using rsh

From: Ross A Macintyre (
Date: Tue Feb 04 1992 - 22:21:22 CST

Thanks to everybody for taking the time to reply.
These include
Apologies if I've missed anybody out.

Original message:
> I am trying to kill(-TERM) an automount daemon on a remote machine and fire it
> up again.
> Problem is I can't fire it up again cleanly.
> When I type
> rsh helios automount -m -f /etc/auto.master
> the automount daemon DOES fire up on helios but the prompt isn't returned to
> me on the
> local machine(machine on which I run rsh).

The general concencus is that this'll work:
        rsh helios 'automount -m -f /etc/auto.master </dev/null >&/dev/null'
        rsh -n helios 'automount -m -f /etc/auto.master >&/dev/null'
which will do the same thing.
My problem was not trying to redirect the standard output.

An interesting one which also works is (sent by Sjoerd Mullender)

> rsh helios 'sh -c "automount -m -f /etc/auto.master </dev/null >/dev/null 2>&1 3>&- 4>&-
 5>&- 6>&- > 7>&- 8>&- 9>&-"'
and the accompanying text

> It looks like the problem I had starting up a remote xterm. The
> problem was that there are more open files than the standard 0, 1, and
> 2. The automount daemon probably closes these three, but since there
> is a fourth open file descriptor, the rsh daemon doesn't die. The
> solution is to manually close all file descriptors. This is pretty
> hard to do from a csh, but from sh it looks like (above)

This also works fine and it opened my eyes to some new syntax!
At one point I thought that
        rsh helios 'automount -m -f /etc/auto.master </dev/null >&/dev/null'
didn't work but I haven't been able to reproduce it.
Anyway I'm sticking with redirecting standard input and output, but if I have any
problems with it, I'd cerainly use Sjoerd's fix (and let people know)

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:35 CDT