/[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 190 by root, Tue Mar 16 23:14:38 2010 UTC revision 193 by dpavlin, Fri Mar 19 14:11:49 2010 UTC
# Line 180  case "$command" in Line 180  case "$command" in
180  start)  start)
181          lxc_exists $1          lxc_exists $1
182          cleanup_init_scripts $1          cleanup_init_scripts $1
183          setup_inittab $1 ::power      "p0::powerfail:/sbin/init 0"          setup_inittab $1 ":respawn:/sbin/getty.*tty1"   "c1:12345:respawn:/sbin/getty 38400 tty1 linux"
184          setup_inittab $1 ::ctrlaltdel "p6::ctrlaltdel:/sbin/init 6"          setup_inittab $1 "::power"                      "p0::powerfail:/sbin/init 0"
185            setup_inittab $1 "::ctrlaltdel"                 "p6::ctrlaltdel:/sbin/init 6"
186          lxc_start $1          lxc_start $1
187          # give container 5 seconds to start more than one process          # give container 5 seconds to start more than one process
188          ( sleep 5 ; nohup $0 watchdog $1 >> /tmp/$1.log 2>/dev/null ) &          ( sleep 5 ; nohup $0 watchdog $1 >> /tmp/$1.log 2>/dev/null ) &

Legend:
Removed from v.190  
changed lines
  Added in v.193

  ViewVC Help
Powered by ViewVC 1.1.26