--- recepies/lxc/lxc-watchdog.sh 2012/08/25 14:13:11 300 +++ recepies/lxc/lxc-watchdog.sh 2013/04/09 19:49:31 301 @@ -150,13 +150,15 @@ lxc_watchdog() { name=$1 +cgroup=$(mount -t cgroup | awk '{ print $3 }') +test -d "$cgroup/lxc/$1" && cgroup="$cgroup/lxc" rootfs=$(lxc_rootfs $1) run=$rootfs/var/run test -L $run && run=$rootfs/`readlink $run` # recent Debian have symlink to /run cd $run || echo "can't cd watchdog into $run" while true; do - tasks=`wc -l < /cgroup/${name}/tasks` + tasks=`wc -l < $cgroup/${name}/tasks` stop_on=1 # init sulogins=`lxc-ps --name $name | grep sulogin | wc -l` if [ "$sulogins" -gt 0 ] ; then