Re: [Summary] Remote boot & remote diag on a SUN

From: Steve Harris (etnibsd!vsh@uunet.UU.NET)
Date: Tue Oct 08 1991 - 22:40:27 CDT


I'm taking the liberty of posting a short followup to Tony Tran's
excellent summary about remote booting a sun. In his article, Tony

> If you remote log in onto the console server, and you need to halt
> the system, use ~~#. Using ~# will halt the console server (which is
> a NO NO).
> Example:
> # rlogin console_server
> # tip starburst
> do something terrible and hang the system
> ~~# (Halts starburst)
> >b (boots the system)
> ~~. (dis-connects the tip session)
> remember that the second tilde will escape the rlogin shell and let
> your ~. get into the tip session.

You can avoid the "double tilda" trap by defining an alternate escape
character for your rlogin session. We use "@":

                # rlogin console_server -e@

Because we have a "modem-server" system to which most everbody must
rlogin in order to tip/cu to the outside world, we have moved
/usr/ucb/rlogin to /usr/lib and replaced it with the shell script
below. This is an ordinary executable shell script, it is NOT setuid
(/usr/lib/rlogin IS setuid root, just as when it was /usr/ucb/rlogin).
It's worked well for us; if anyone has suggestions, send email and I
will summarize.

=-=-=-=-=-=-=-=-=-=-=-=-= cut here =-=-=-=-=-=-=-=-=-=-=-=-=

R=/usr/lib/rlogin # the real rlogin program
E="-e@" # default escape arg

U="usage: rlogin host [ -ex ] [ -l username ] [ -8 ] [ -L ]"

[ $# -lt 1 ] && { echo $U; exit 1; }

# if user specifys escape char, don't use default
for arg
        case "$arg" in
          -e?) E="";;

exec $R "$@" $E # exec real rlogin

Steve Harris - Eaton Corp. - Beverly, MA - uunet!etnibsd!vsh

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