From: Daniel Lezcano Date: Thu, 11 Aug 2011 15:54:57 +0000 (+0200) Subject: lxc-ps : fix the container name search X-Git-Tag: lxc-0.7.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=858133f52ce4a7eaa0ace709c4cb037ffa408caf;p=thirdparty%2Flxc.git 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 --- diff --git a/src/lxc/lxc-ps.in b/src/lxc/lxc-ps.in index dd3b7fe39..2f1d537fa 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; }