[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problem: 2.6.x and network (e1000 Intel 82546EB)



On Thu, Apr 08, 2004 at 11:15:13PM +0200, Bernd Eckenfels wrote:
> On Thu, Apr 08, 2004 at 11:48:23AM -0700, Don Armstrong wrote:
> > 1: /etc/init.d/networking should probably call nameif -s if
> > /etc/mactab exists by default.
> yes, see
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203718
> problem is that nameif is provided by net-tools and /etc/init.d/networking
> is in netbase, but I try to coordinate this.

Hrm. Putting:

	#!/bin/sh

	if [ -e /etc/mactab -a "$MODE" = "start" ]; then
		X=$(grep "^[[:space:]]*${IFACE}[[:space:]]" | head -n1)
		if [ "$X" != "" ]; then
			nameif -s $X
		fi
	fi

in /etc/network/if-pre-up.d/00nameif should do what you want. If nameif's
syntax was changed so it'd lookup the macaddress for a given interface itself,
that'd simplify to:

	#!/bin/sh
	if [ -e /etc/mactab -a "$MODE" = "start" ]; then
		nameif -sn "$IFACE"
	fi

Alternatively you could do:

	iface ext0 inet static
		...
		name-by-mac 11:22:33:44:55:66

and have

	#!/bin/sh
	if [ "$IF_NAME_BY_MAC" != "" ]; then
		nameif -s "$IFACE" "$IF_NAME_BY_MAC"
	fi

in /etc/network/if-pre-up.d/00nameif (and have the configuration all be in
/etc/network/interfaces, rather than some of it be in /etc/mactab).

Cheers,
aj

-- 
Anthony Towns <aj@humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.

Protect Open Source in Australia from over-reaching changes to IP law
http://www.petitiononline.com/auftaip/ & http://www.linux.org.au/fta/

Attachment: signature.asc
Description: Digital signature


Reply to: