55 |
|
|
56 |
lxc_status() { |
lxc_status() { |
57 |
( find /var/lib/lxc/ -name "config" | cut -d/ -f5 | sort -u | while read name ; do |
( find /var/lib/lxc/ -name "config" | cut -d/ -f5 | sort -u | while read name ; do |
58 |
status=`lxc-info -n $name 2>/dev/null | grep state: | cut -d: -f2` |
status=`lxc-info -n $name 2>/dev/null | grep state: | cut -d: -f2` # 0.7.5 |
59 |
|
test -z "$status" && status=`lxc-info -n $name | sed -e 's/^.* is //'` # 0.7.2 |
60 |
boot="-" |
boot="-" |
61 |
test -s /var/lib/lxc/$name/on_boot && boot="boot" |
test -s /var/lib/lxc/$name/on_boot && boot="boot" |
62 |
echo "$name $status $boot $(lxc_rootfs $name) $(lxc_ip $name) $(lxc_hostname $name)" |
echo "$name $status $boot $(lxc_rootfs $name) $(lxc_ip $name) $(lxc_hostname $name)" |