* Fixed a couple remaining issues from the recent merger. Specifically, '$$anvil' was fixed from a bad regex and the path/names of our tools were fixed.
$$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { full_path => $full_path }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { full_path => $full_path }});
if (-d $full_path)
if (-d $full_path)
{
{
# Pull out the data I want.
# Pull out the data I want.
my $interface = $file;
my $interface = $file;
my $mac_address = $$anvil->Storage->read_file({file => $full_path."/address"});
my $mac_address = $anvil->Storage->read_file({file => $full_path."/address"});
my $link_state = $$anvil->Storage->read_file({file => $full_path."/carrier"});
my $link_state = $anvil->Storage->read_file({file => $full_path."/carrier"});
my $mtu = $$anvil->Storage->read_file({file => $full_path."/mtu"});
my $mtu = $anvil->Storage->read_file({file => $full_path."/mtu"});
my $duplex = $$anvil->Storage->read_file({file => $full_path."/duplex"}); # full or half?
my $duplex = $anvil->Storage->read_file({file => $full_path."/duplex"}); # full or half?
my $operational = $$anvil->Storage->read_file({file => $full_path."/operstate"}); # up or down
my $operational = $anvil->Storage->read_file({file => $full_path."/operstate"}); # up or down
my $speed = $link_state ? $$anvil->Storage->read_file({file => $full_path."/speed"}) : 0; # Mbps (ie: 1000 = Gbps), gives a very high number for unplugged link
my $speed = $link_state ? $anvil->Storage->read_file({file => $full_path."/speed"}) : 0; # Mbps (ie: 1000 = Gbps), gives a very high number for unplugged link
if ($speed > 100000)
if ($speed > 100000)
{
{
# NOTE: This is probably 0 now... Though someday >100 Gbps will be reasonable
# NOTE: This is probably 0 now... Though someday >100 Gbps will be reasonable
@ -70,7 +70,7 @@ sub report_network
# Find the media, if possible.
# Find the media, if possible.
my $media = "unknown";
my $media = "unknown";
my $ethtool = $$anvil->System->call({shell_call => $$anvil->data->{path}{exe}{ethtool}});
my $ethtool = $anvil->System->call({shell_call => $anvil->data->{path}{exe}{ethtool}});
foreach my $line (split/\n/, $ethtool)
foreach my $line (split/\n/, $ethtool)
{
{
if ($line =~ /Supported ports: \[ (.*?) \]/i)
if ($line =~ /Supported ports: \[ (.*?) \]/i)
@ -81,7 +81,7 @@ sub report_network
}
}
# Log
# Log
$$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {