54 |
} |
} |
55 |
|
|
56 |
lxc_status() { |
lxc_status() { |
57 |
( find /var/lib/lxc/ -name "config" | cut -d/ -f5 | sort -u | xargs -i lxc-info -n {} | sed "s/'//g" | while read name is status ; 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` |
59 |
boot="-" |
boot="-" |
60 |
test -s /var/lib/lxc/$name/on_boot && boot="boot" |
test -s /var/lib/lxc/$name/on_boot && boot="boot" |
61 |
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)" |