[ale] Network Vendor String
Christopher Fowler
cfowler at outpostsentinel.com
Tue Oct 10 11:53:50 EDT 2006
Pass #1:
--- [ Cut Here ] -------------------
#!/usr/bin/perl
die "$0 <interface>\n" unless $ARGV[0];
my $ifconfig = `/sbin/ifconfig $ARGV[0] | head -n1`;
$ifconfig =~ m/HWaddr\s(.+?)$/;
my $mac = $1;
$mac =~ m/^(..):(..):(..)/;
my $vendor = "$1:$2:$3";
print "Vendor: $vendor\n";
--- [ Cut Here ] -------------------
On Tue, 2006-10-10 at 08:46 -0700, ale at jeffx.com wrote:
> Say I am writing a little script to obtain hardware inventory on my linux
> system. I want the vendor string of the network card(s). I know there
> has to be a way to get it because the installer reads the information as
> does network-configuration tools.
>
> I have looked around in /proc with no success. Is there a way to get that
> information?
>
> Regards,
> Jeff
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list