diff options
author | 2011-08-11 17:54:57 +0200 | |
---|---|---|
committer | 2011-08-11 17:54:57 +0200 | |
commit | 858133f52ce4a7eaa0ace709c4cb037ffa408caf (patch) | |
tree | 54f59d5a0664667ab9e56ca5ac3d390c326c40bb /src | |
parent | add container init pid with the lxc-info command (diff) | |
download | lxc-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-x | src/lxc/lxc-ps.in | 9 |
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; } |