SUMMARY: remote access

From: Mike Lipscomb (lipscomb@vision1.engr.utk.edu)
Date: Wed Aug 10 1994 - 00:49:35 CDT


Original query:
 
> we have a Sun sparc portable that we would like to take on
> the road occasionally. We have a set of scripts that we
> use to configure it for "standalone" or "ethernet NIS"
> mode. Standalone reads local password file and has all the
> necessary local software for windowing, etc. Ethernet mode
> means to read the NIS passwords and to automount any
> directories that a user might need. These work great but
> we would like to simplify the process even more. Is there
> a way to determine at boot time (through ping or another
> util.) which way to boot? In other words, if the portable
> can determine that there is an AUI transceiver connected
> then boot using the ethernet connection. If there is not a
> transceiver (but a loopback plug, and ethernet terminator)
> then boot using the standalone configuration. This would
> take a lot of burdens off of our users who would be taking
> this machine out in the field. Our OS is SunOS 4.1.3.

Since we had an RDI Powerlite portable, I decided
to go with their Autonet bundled software (which
I think is available separately, contact RDI below).
This software works exactly like I wanted because it
configures the machine auto-magically for "on
the road" or "at home with NIS" upon boot-up.

RDI Computer Corp.
6696 Mesa Ridge Road, Bldg A
San Diego, CA 92121
ph: 619 558-6985
fax: 619 558-7061

Suggestions included:

***
From: weitzel@burke.com (David Weitzel)

Could you place some sort of "if" test in your rc file
to run 2 different versions of rc.local to set up
your machine appropriately?

You could probably do something like ping one of your local
hosts on you backbone and if alive, run one rc.local
and if not run the other?

***
From: stevee@sbei.com (Steve Ehrhardt)

This isn't exatcly an answer to your question, but I hope you find it
useful anyway.

It's undoubtedly possible to detect whether you're attached to a network or
not and configure accordingly. I considered trying to do this, but decided
that I didn`t care to risk modifying the system start-up scripts that much.

What I created instead is an interactive script that runs at boot time and
asks the user what network configuration they want (default is the status
quo). They may either:

1) Select a pre-defined network configuration (or specify standalone).

2) Define a new network configuration (IP addresses, NIS yes or no, etc.)

This seems to work fine, and is extensible to set up for different security
setups for different networks and the like. I'm currently using it on
a SPARCbook 3 running 4.1.3U1, and I'd be quite willing to share it
if it meets your needs.

***
From: alek@spatial.com (Alek O. Komarnitsky)

FYI: I "cheat" by pinging a "known" machine (our mailhost)
from the machine (it's IP address had been stable for three years).

If I get an answer, I assume I'm "at" Spatial on the network
and start up YP, etc. If not, than I go into standalone mode.

Turns out not that much to check for in the "rc" files, and then I just
have to switch a few other things (passwd, exports, printcap, etc.)

Let me know if you want my stuff - it's not fancy, but it works.
alek

***
From: garrett@athena.SDSU.Edu (Garrett D'Amore)

Modify /etc/rc to attempt to ping your NIS server before running
the commands for NIS. If that fails, then run the commands
for local files. These are basically two *big* if branches
in rc. An ugly solution, but probably the easiest one (if you
are competent in shell programming.)

***
From: perryh@pluto.rain.com (Perry Hutchison)

I believe "ping" returns zero exit status if the target is alive, or
non-zero if it is not. The downside is that it takes something like
30 seconds or a minute to time out if the target does not respond.
(This time may be settable on the commend line -- check the manpage.)

Some care will be needed in setting this up: the test must be done
after ifconfig but before starting NIS, as a NIS client will hang if it
cannot find a server; meanwhile without NIS you have only /etc/hosts to
map names to IP addresses so the ping invocation in the script may need
to hardcode the target's IP address.

***
From: mueller@darmstadt.gmd.de (Lothar Mueller)

The only portable I know of, which can determine if it is attached to the
net is SparcBook 1 and SparcBook 2 - ifconfig -a yields ATTACHED if
connected. Even with SparcBook 3 this doesn't work anymore as they use
another ethernet chip.
I too would like a possibility to determine wether the ethernet is connected
or not for every sparc !
      
***
From: Birger.Wathne@vest.sdata.no (Birger A. Wathne)

The TadPole has hardware support for this, and can be set up as a
NIS slave so that it will bind to itself when on the road.

When there is no transceiver in the port, it will fall back to a
kind of 'emulated up', so networking will work as if there was
a network.

***
From: kat@netcom.com (Kathryn Fielding)

JOIN is definitely overkill for what you want - AutoNET is designed
to do exactly what you want. That's what I use - I have my office
configuration, and my home network saved, and simply let AutoNET
figure out where I am, and do the appropriate thing. What I've done is
have my disconnected mode be the default, and have the network
configurations for the other two places that I commonly work be saved.
When I turn on the machine, it boots into the right thing.
For my uses, I don't use most of the other features - I don't need
them, but having the machine figure out whether I'm at home
or at the office (and running NIS) is pretty convenient. The things
that I use are the mounts, hosts and NIS/None domain status.

end of summary



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:07 CDT