lxc-ps : fix the container name search

We don't have to check for the cgroup namespace name because the
pid we are looking for is already in the list of the container owned by
lxc and retrieved from the abstract socket command name.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Daniel Lezcano 2011-08-11 17:54:57 +02:00 committed by Daniel Lezcano
parent 5d42011acb
commit 858133f52c

View File

@ -118,12 +118,9 @@ sub get_container {
my $container = '';
foreach ( @cgroup ) {
chomp;
# find the container name
if (m/[:,]ns[:,]/o) {
# container name after :/
s/.*:\///o;
$container = $_;
}
# find the container name after :/
s/.*:\///o;
$container = $_;
}
return $container;
}