]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-ps : fix the container name search
authorDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 11 Aug 2011 15:54:57 +0000 (17:54 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 11 Aug 2011 15:54:57 +0000 (17:54 +0200)
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>
src/lxc/lxc-ps.in

index dd3b7fe397b9db5d0ae2cdb4ee488f7639d658c4..2f1d537fa9bb00ad07d17505d83c1684eed5edee 100755 (executable)
@@ -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;
 }