/[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 236 by dpavlin, Wed Jan 26 12:16:23 2011 UTC revision 244 by dpavlin, Tue Mar 29 18:00:40 2011 UTC
# Line 71  cleanup_init_scripts() { Line 71  cleanup_init_scripts() {
71                  $rootfs/etc/rc?.d/*umountroot \                  $rootfs/etc/rc?.d/*umountroot \
72                  $rootfs/etc/rc?.d/*hwclock* \                  $rootfs/etc/rc?.d/*hwclock* \
73                  $rootfs/etc/rc?.d/*udev* \                  $rootfs/etc/rc?.d/*udev* \
74                    $rootfs/etc/rc?.d/*checkfs* \
75          2>/dev/null | xargs -i rm -v {}          2>/dev/null | xargs -i rm -v {}
76    
77          echo $1 > $rootfs/etc/hostname          echo $1 > $rootfs/etc/hostname
# Line 132  lxc_start() { Line 133  lxc_start() {
133    
134          if ! lxc-info -n $name | grep RUNNING ; then          if ! lxc-info -n $name | grep RUNNING ; then
135                  lxc_log "$name start"                  lxc_log "$name start"
136                    dev=`df -P $rootfs | tail -1 | cut -d" " -f1`
137                    mount $dev -o remount,rw # fix debian upgrade which remounts dir ro
138                  lxc-start -n $name -o /tmp/${name}.log -d                  lxc-start -n $name -o /tmp/${name}.log -d
139                  lxc-wait  -n $name -s RUNNING                  lxc-wait  -n $name -s RUNNING
140                  lxc-info  -n $name                  lxc-info  -n $name

Legend:
Removed from v.236  
changed lines
  Added in v.244

  ViewVC Help
Powered by ViewVC 1.1.26