Originally, lxc-ls listed all containers by printing the directory names in /var/lib/lxc. After commit 65cb447f9b8d1ac8dcf9df24a4f877180444f003, lxc-ls now finds and prints active containers by searching for open UNIX sockets named '/var/lib/lxc/<name>/command'. However, all containers are still printed using the old method as well, so now the active containers just get printed twice.
Assuming that the intention of the above commit was to only list active containers, do not print the directory names in /var/lib/lxc any longer. Signed-off-by: David Ward <david.w...@ll.mit.edu> --- src/lxc/lxc-ls.in | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in index d200509..b923c56 100644 --- a/src/lxc/lxc-ls.in +++ b/src/lxc/lxc-ls.in @@ -23,8 +23,6 @@ function get_cgroup() mount_point=`echo "$mount_string" |cut -d' ' -f2`; } -ls "$@" $lxcpath - active=$(netstat -xl 2>/dev/null | grep $lxcpath | \ sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#'); -- 1.7.1 ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel