[BusyBox] [PATCH] macadddr command
Paul Fox
pgf at brightstareng.com
Thu Jul 21 21:18:46 UTC 2005
> 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
More information about the busybox
mailing list