and it seems there were many changes left uncommitted. i have no idea what state this is in but we will refactor or start over from this point.
20 lines
307 B
Perl
Executable File
20 lines
307 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
|
|
# > ls /var/lib/lxc
|
|
# cnode1/ cnode2/ cnode3/ cnode4/ cnode5/
|
|
|
|
my @nodes = `ls /var/lib/lxc`;
|
|
|
|
for (@nodes)
|
|
{
|
|
chomp $_;
|
|
|
|
my $mac = `grep hwaddr /var/lib/lxc/$_/config|grep -v '#'`;
|
|
$mac =~ s/.*?=\s+(.*?)/$1/;
|
|
|
|
print `lxc-info -n $_`;
|
|
print "MAC Addr:\t$mac\n";
|
|
}
|