Chris Hammer 2994a8f849 its been a while since i've worked on this
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.
2023-12-08 01:09:54 -05:00

21 lines
336 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 "Name:\t\t$_\n";
print `lxc-info -n $_ -is`;
print "MAC Addr:\t$mac\n";
}