> On Sun, May 23, 2004 at 07:37:37PM -0400, Louis A. Mamakos wrote: > > >>> This could be the first step towards teaching rc.conf about something like > > >>> network_interfaces_rename="hw-00:03:0d:08:dc:a7 sis0int" > > >> I don't really like the idea of adding magic values to the interface > > >> namespace that only work with ifconfig. If you want ifconfig to match > >> I agree, but there is another option: make such things not ifconfig-specific. > >> I mean that it could be done though renaming the interface into the some > >> lladdr-dependent name with fixed format. For example, > > This is all pretty interesting, though it seems like you'd only > > need to cobble together a shell script to do what you're after. > > You've absolutely right and I wanted to propose it just on the base of > currently existing functionality (independently of this thread). However if > there will be automatic renaming things would be easier. Thus I decided to > combine both approaches since it leads to simple solution. > > I would post my current changes (those giving the discussing functionality) to > the startup scripts as PR and send here the number. I'll do it if anybody will > express any interest in that. Actually those scripts could be changed in future > if ``ifconfig'' will provide such possibility out-of-box, and changes will be > seamless for users.
This interface renaming operation is likely to only occur as the system boots, and probably is an "automated" process rather than one that involves human. Keeping with the decades-long UNIX tradition of using combinations of tools would lead you to writing a simple shell script, rather than going to all the trouble to extend the existing tool. Certainly there's no performance-related reason to do so. I guess I don't see how you might choose to extend ifconfig to implement some function that can't be done with some external tools. About the only ifconfig capability you need is a way to discover the link-level address (and hopefull media type), and a way to cause the renaming operation to occur. I'm not sure how much easier "automatic" renaming might be. You still need some ability to specify policy on what interfaces are renamed (e.g., only 100Base-T ethernet but not 802.11 wireless). Once you've opened that can of worms, doing the actual renaming is likely the easy part of the problem. There's already a bunch of code that iterates over network interface in /etc/rc.network (on 4-STABLE anyway). In the end, it's a matter of taste and opinion. louie _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"