starting automount from another machine using rsh

2007-12-25 7:37:00

Thanks to everybody for taking the time to reply.

These include upkar@wsu-eng.eng.wayne.edu

                paulo@DCC.UNICAMP.ANSP.BR

                mikem@juliet.ll.mit.edu

                fetrow@orac.biostat.washington.edu

                Sjoerd.Mullender@cwi.nl

                miker@sbcoc.com

                trinkle@cs.purdue.edu

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'

        or

        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)

Comments

Got something to say?

You must be logged in to post a comment.