From: Rainer Weikusat <rweiku...@mobileactivedefense.com> The lxc-ls shell script uses netstat -xa to get a listing of AF_UNIX sockets it then parses in order to determine the names of presently running containers. This is wrong because it will list the listening socket and all sockets created by accepting connections on that. This causes the script to display the names of containers with active lxc-console sessions 1 + n times, n being the number of active console sessions. The patch below fixes this by using netstat -xl instead which only displays the listening sockets.
Signed-off-by: Rainer Weikusat <rweiku...@mobileactivedefense.com> --- diff -rNu lxc-0.7.5/src/lxc/lxc-ls.in lxc-0.7.5.p/src/lxc/lxc-ls.in --- lxc-0.7.5/src/lxc/lxc-ls.in 2011-09-14 17:41:54.898556072 +0100 +++ lxc-0.7.5.p/src/lxc/lxc-ls.in 2011-09-14 17:42:34.756399550 +0100 @@ -24,7 +24,7 @@ ls "$@" $lxcpath -active=$(netstat -xa | grep $lxcpath | \ +active=$(netstat -xl | grep $lxcpath | \ sed -e 's#.*'"$lxcpath/"'\(.*\)/command#\1#'); if test -n "$active"; then ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel