Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!sdd.hp.com!elroy.jpl.nasa.gov!turnkey!itcorp!geoff From: geoff@ITcorp.com (Geoff Kuenning) Newsgroups: comp.sys.next Subject: Re: checking for ethernet at boot time Message-ID: <1991May10.043829.14766@ITcorp.com> Date: 10 May 91 04:38:29 GMT References: <1991May8.151325.20226@bethel.edu> Distribution: comp.sys.next Organization: Interrupt Technology Corporation, Manhattan Beach, CA Lines: 15 In article <1991May8.151325.20226@bethel.edu> gossett@bethel.edu (Eric Gossett) writes: > I move my NextStation between two locations. One location is on an ethernet, > the other is a stand-alone setup. I would like to run some mounts in rc.local > if I am attached to the ethernet, but not do the mounts if I am stand-alone. > How can I check at boot time to see if I am attached to the ethernet? In 2.0, look in /etc/rc for the variable NETWORKUP, which is set to either "-YES-" or "-NO-" (a horrible choice of strings, since it can confuse "test" but that's not my problem). Simply modify /etc/rc to export this variable, and then you can test it in /etc/rc.local. /etc/rc has lots of examples of how to do this. -- Geoff Kuenning geoff@ITcorp.com uunet!desint!geoff