Don't list containers w/ active console sessions multiple times
Don't list containers w/ active console sessions multiple times

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 <80f00641739f38c98bb00f0549e05479f80b50fb@mobileactivedefense.com>
Signed-off-by: Daniel Lezcano <3211518dd4d87cb3f7ee12cb52e14b7fb2bc0446@fr.ibm.com>

aeris/lxc,fwilson42/lxc,yubo/lxc,abstrakraft/lxc-android-lxc,bmoar/lxc,sapun/lxc,weizhenwei/lxc,inokappa/lxc,terceiro/lxc,ioops/lxc,ioops/lxc,lazy404/lxc,efiop/lxc,Ponce/lxc,rowhit/lxc,thmo/lxc,christiaan/lxc,lazy404/lxc,raspberrypython/lxc,regit/lxc,thmo/lxc,federicobriata/lxc,armcc/lxc,ysbnim/lxc,weizhenwei/lxc,ss1h2a3tw/lxc,LynxChaus/lxc,JohnPeacockMessageSystems/lxc,ostap/lxc,tych0/lxc,sapun/lxc,ss1h2a3tw/lxc,bmoar/lxc,szaszg/lxc,potatosalad/lxc,hkjolhede/lxc,sapun/lxc,caglar10ur/lxc,ecarrara/lxc,ojkastl/lxc_Patches,LynxChaus/lxc,coconutpilot/lxc-gentoo-new,christiaan/lxc,akshaykarle/lxc,codebauss/lxc,ostap/lxc,szaszg/lxc,yubo/lxc,caglar10ur/lxc,glensc/lxc,lisongmin/lxc,jirislaby/lxc,codebauss/lxc,yubo/lxc,smoser/lxc,inokappa/lxc,ojkastl/lxc_Patches,aeris/lxc,hkjolhede/lxc,terceiro/lxc,ecarrara/lxc,hfuCN/lxc,ysbnim/lxc,LynxChaus/lxc,fwilson42/lxc,DarknessBeforeDawn/lxc,QingweiPeterLan/cs188-lxc,regit/lxc,akshaykarle/lxc,efiop/lxc,rldleblanc/lxc,virajs/lxc,ioops/lxc,bostjan/lxc,ysbnim/lxc,abstrakraft/lxc-android-lxc,hallyn/lxc,rowhit/lxc,coconutpilot/lxc-gentoo-new,JohnPeacockMessageSystems/lxc,JohnPeacockMessageSystems/lxc,QingweiPeterLan/cs188-lxc,christiaan/lxc,glensc/lxc,DarknessBeforeDawn/lxc,QingweiPeterLan/cs188-lxc,szaszg/lxc,smoser/lxc,ecarrara/lxc,lisongmin/lxc,GreatFruitOmsk/lxc,rldleblanc/lxc,ksperis/lxc,bostjan/lxc,ss1h2a3tw/lxc,smoser/lxc,major/lxc,Distrotech/lxc,rowhit/lxc,Pelagicore/lxc,federicobriata/lxc,GreatFruitOmsk/lxc,jirislaby/lxc,ksperis/lxc,glensc/lxc,cjwatson/lxc,caglar10ur/lxc,lazy404/lxc,armcc/lxc,hallyn/lxc,tych0/lxc,lisongmin/lxc,Distrotech/lxc,federicobriata/lxc,regit/lxc,codebauss/lxc,abstrakraft/lxc-android-lxc,hfuCN/lxc,virajs/lxc,major/lxc,cjwatson/lxc,abstrakraft/lxc-android-lxc,akshaykarle/lxc,cjwatson/lxc,Ponce/lxc,weizhenwei/lxc,ksperis/lxc,bostjan/lxc,Ponce/lxc,Pelagicore/lxc,Pelagicore/lxc,raspberrypython/lxc,tych0/lxc,ojkastl/lxc_Patches,virajs/lxc,thmo/lxc,terceiro/lxc,bmoar/lxc,efiop/lxc,hkjolhede/lxc,rldleblanc/lxc,DarknessBeforeDawn/lxc,hallyn/lxc,Distrotech/lxc,hfuCN/lxc,GreatFruitOmsk/lxc,armcc/lxc,potatosalad/lxc,fwilson42/lxc,major/lxc,aeris/lxc,ojkastl/lxc_Patches,jirislaby/lxc,smoser/lxc,raspberrypython/lxc