aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@free.fr>2011-08-11 17:54:57 +0200
committerDaniel Lezcano <dlezcano@fr.ibm.com>2011-08-11 17:54:57 +0200
commit858133f52ce4a7eaa0ace709c4cb037ffa408caf (patch)
tree54f59d5a0664667ab9e56ca5ac3d390c326c40bb /src
parentadd container init pid with the lxc-info command (diff)
downloadlxc-858133f52ce4a7eaa0ace709c4cb037ffa408caf.tar.gz
lxc-858133f52ce4a7eaa0ace709c4cb037ffa408caf.tar.bz2
lxc-858133f52ce4a7eaa0ace709c4cb037ffa408caf.zip
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>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/lxc/lxc-ps.in9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lxc/lxc-ps.in b/src/lxc/lxc-ps.in
index dd3b7fe..2f1d537 100755
--- a/src/lxc/lxc-ps.in
+++ b/src/lxc/lxc-ps.in
@@ -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;
}