--- recepies/lxc/lxc-watchdog.sh 2011/06/26 15:00:40 264 +++ recepies/lxc/lxc-watchdog.sh 2011/09/09 18:21:14 271 @@ -54,7 +54,8 @@ } lxc_status() { - ( 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 + status=`lxc-info -n $name 2>/dev/null | grep state: | cut -d: -f2` boot="-" test -s /var/lib/lxc/$name/on_boot && boot="boot" echo "$name $status $boot $(lxc_rootfs $name) $(lxc_ip $name) $(lxc_hostname $name)"