mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 09:47:06 +00:00
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:
parent
5d42011acb
commit
858133f52c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user