On 06/14/2012 11:40 PM, -- NeoX -- wrote:
> #!/bin/bash
> [...custom script...]
In Ubuntu 12.04 there is a custom script called lxc-list:
#!/bin/sh
set -e
if [ ! -x "$(which lxc-info 2>/dev/null)" ]
then
echo "E: lxc-info - no such file"
exit 1
fi
for _STATUS in RUNNING STOPPED
do
echo ${_STATUS}
for _CONTAINER in $(lxc-ls | sort -u)
do
if lxc-info -n ${_CONTAINER} 2>&1 | grep -qs "${_STATUS}"
then
echo -n " ${_CONTAINER}"
if [ -e /etc/lxc/auto/${_CONTAINER} ] ||
[ -e /etc/lxc/auto/${_CONTAINER}.conf ]
then
echo " (auto)"
else
echo
fi
fi
done
echo
done
tamas
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-users