--- recepies/lxc/lxc-watchdog.sh 2010/03/24 19:03:16 195 +++ recepies/lxc/lxc-watchdog.sh 2010/08/10 17:03:15 226 @@ -42,11 +42,13 @@ 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=" " + ( 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)" - done + 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 }