Turning off le0

2007-12-25 8:14:00

Apologies for the late summary.

I had installed an SBus FDDI card in an IPC and needed to shut off the

ethernet port. Needless to say, the installation instructions didn't

explain how to do this, merely assuming you would be routing and subnetting.

I had tried removing hostname.le0 but got error messages during the boot.

This was because the Network Peripherals FDDI card uses hostname.sbf0, so

the name won't get found by hostname.?0 in /etc/rc.boot.

90% of the responses were essentialy the same and require a minor edit to

/etc/rc.boot. The most annoying thing is that I could have figured it out

if I hadn't been rushed to get it running at all; luckily for me this list

exists.

Here is the relevant block from rc.boot:

#

# Set hostname from /etc/hostname.xx0 file, if none exists no harm done

#

hostname="`shcat /etc/hostname.?0 2>/dev/null`"

if [ ! -f /etc/.UNCONFIGURED -a ! -z "$hostname" -a "$hostname" != "noname" ]; then

        hostname $hostname

fi

You can either create a hostname.xx0 file containing the same name as

hostname.sbf0, or edit like this:

hostname="`shcat /etc/hostname.sbf0 2>/dev/null`"

hostname="`shcat /etc/hostname.*0 2>/dev/null`"

I used the first because I wanted to be sure which interface it got the name

from. Another option is just to change the line to:

hostname="the_right_hostname" and hardcode it that way.

Steven M Rezsutek sent me a hack he made to rc.boot that allows you to

create ifconfig-options.<interface> files that the boot script reads.

He hasn't tried it with diskless machines, and I didn't to use it, but I'm

keeping a copy in case anyone else needs it.

Mike

Thanks to:

angela@tandem.com Angela Marie Thomas

Peter Shipley <uunet!tfs.COM!shipley>

uunet!cats.UCSC.EDU!philb

eckhard@ts.go.dlr.de Eckhard Rueggeberg

aribi@geo.vu.nl Arie Bikker

trinkle@cs.purdue.edu Daniel Trinkle

uunet!jpmorgan.com!shandelm Joel Shandelman

jeff@millie.loc.gov Jeff Mallory

uunet!allegra.att.com!chip Chip Christian

chris@cs.yorku.ca Chris Phillips

uunet!nosc.mil!wolfgang%sunspot.nosc.mil Lewis E. Wolfgang

uunet!soac.bellcore.com!cal Christian Lawrence

uunet!odinba!jeff Jeff Tate

vasey@issi.com Ron Vasey

uunet!il.us.swissbank.com!miker Mike Raffety

Ian_Reddy@sfu.ca Ian Reddy

uunet!Novell.COM!Mark_Richardson

uunet!baloo.gsfc.nasa.gov!steve Steven M Rezsutek

Comments

Got something to say?

You must be logged in to post a comment.