[BusyBox] [PATCH] macadddr command
Jason Schoon
floydpink at gmail.com
Thu Jul 21 23:14:29 MDT 2005
It's been quite a while since I included ifconfig in my system, but it
seems to me that it was quite a pig. I could see wanting this small
utility instead, if ifconfig was not being used for other tasks.
We have a small utilty named ifethmac that does nothing more than set
the MAC address of an interface. Perhaps I should marry that with
this mac-addr code to create an ifethmacgetset type of thing.
Just my thoughts...
On 7/21/05, Paul Fox <pgf at brightstareng.com> wrote:
> > the warewulf project uses busybox for its ramdisk image (which works
> > great), with which they have a standalone mac-addr binary that simply
> > emits the mac address of an interface specified on the command line. i'm
>
> i understand the usefulness of such a command, but is an applet
> really necessary? how about:
>
> $ cat >macaddr <<\EOF
> ifconfig $1 | sed -ne 's/.*HWaddr \(.*\)$/\1/p' -e q
> EOF
>
> or:
>
> $ cat >macaddr <<\EOF
> set -- $(ip -o -f link address show $1)
> echo ${11}
> EOF
>
> if you're requesting the mac address often enough that the
> performance will make a difference, i'd love to hear more about
> the application.
>
> paul
>
>
> > working on better integration, so have ported mac-addr to busybox (but
> > without the hypen :) resulting in the following patch, submitted in hopes
> > that it will be useful.
> >
> > two pieces: macaddr.c (goes in networking) and the glue. (new to
> > subversion; it didn't give me macaddr.c in diff, probably showing where i
> > didn't know to include an additional step...)
> >
> ...
>
> =---------------------
> paul fox, pgf at brightstareng.com
>
>
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>
>
>
More information about the busybox
mailing list