--- recepies/lxc/lxc-watchdog.sh 2010/03/24 19:06:42 196 +++ recepies/lxc/lxc-watchdog.sh 2010/08/10 17:03:15 226 @@ -44,8 +44,10 @@ 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 boot="-" + hostname=`cat $(lxc_rootfs $name)/etc/hostname` + ip=`grep address $(lxc_rootfs $name)/etc/network/interfaces | sed 's/.*address //'` test -s /var/lib/lxc/$name/on_boot && boot="boot" - echo "$name $status $boot $(lxc_rootfs $name)" + echo "$name $status $boot $(lxc_rootfs $name) $ip $hostname" done ) | column -t } @@ -57,7 +59,10 @@ $rootfs/etc/rc?.d/*umountfs \ $rootfs/etc/rc?.d/*umountroot \ $rootfs/etc/rc?.d/*hwclock* \ + $rootfs/etc/rc?.d/*udev* \ 2>/dev/null | xargs -i rm -v {} + + echo $1 > $rootfs/etc/hostname }