/[sysadmin-cookbook]/recepies/lxc/lxc-watchdog.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/lxc/lxc-watchdog.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 177 by dpavlin, Tue Mar 16 14:52:56 2010 UTC revision 178 by dpavlin, Tue Mar 16 15:06:30 2010 UTC
# Line 16  fi Line 16  fi
16  rootfs=`grep lxc.rootfs /var/lib/lxc/$name/config | cut -d= -f2`  rootfs=`grep lxc.rootfs /var/lib/lxc/$name/config | cut -d= -f2`
17  echo "$name rootfs $rootfs"  echo "$name rootfs $rootfs"
18    
19    # cleanup init scripts which don't work in containers
20    ls $rootfs/etc/rc?.d/*umountfs 2>/dev/null | xargs -i rm -v {}
21    ls $rootfs/etc/rc?.d/*umountroot 2>/dev/null | xargs -i rm -v {}
22    ls $rootfs/etc/rc?.d/*hwclock* 2>/dev/null | xargs -i rm -v {}
23    
24  lxc-info -n $name | grep RUNNING || lxc-start -d -n $name -o /tmp/${name}.log && echo "$name start"  lxc-info -n $name | grep RUNNING || lxc-start -d -n $name -o /tmp/${name}.log && echo "$name start"
25    
26  while true; do  while true; do

Legend:
Removed from v.177  
changed lines
  Added in v.178

  ViewVC Help
Powered by ViewVC 1.1.26