~ubuntu-branches/ubuntu/quantal/lxc/quantal-201208081743

« back to all changes in this revision

Viewing changes to debian/local/lxc-list

  • Committer: Stéphane Graber
  • Date: 2012-06-25 18:22:47 UTC
  • Revision ID: stgraber@ubuntu.com-20120625182247-lwhlrmlpff39rh7i
Fix lxc-list to work on both Debian and Ubuntu and list containers only once.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
do
13
13
        echo ${_STATUS}
14
14
 
15
 
        for _CONTAINER in $(lxc-ls)
 
15
        for _CONTAINER in $(lxc-ls | sort -u)
16
16
        do
17
17
                if lxc-info -n ${_CONTAINER} 2>&1 | grep -qs "${_STATUS}"
18
18
                then
19
19
                        echo -n "  ${_CONTAINER}"
20
20
 
21
 
                        if [ -e /etc/lxc/auto/${_CONTAINER} ]
 
21
                        if [ -e /etc/lxc/auto/${_CONTAINER} ] || [ -e /etc/lxc/auto/${_CONTAINER}.conf ]
22
22
                        then
23
23
                                echo " (auto)"
24
24
                        else