xen-drbd

annotate init.d-xen-drbd @ 0:b6dc3480caae

xen-drbd merge
author igor
date Thu Sep 27 18:56:29 2007 +0300 (2007-09-27)
parents
children d6f7c53b085d
rev   line source
igor@0 1 #!/bin/sh
igor@0 2
igor@0 3 XEN_DRBD_PATH='/usr/bin'
igor@0 4 TOPOLOGY_NAME='xen-drbd'
igor@0 5 START_ACTION='nothing'
igor@0 6 [ -e /etc/default/xen-drbd ] && . /etc/default/xen-drbd
igor@0 7
igor@0 8 case $1 in
igor@0 9 start)
igor@0 10 $XEN_DRBD_PATH/xen-drbd-install.py ${TOPOLOGY_NAME} make-links | sh -s
igor@0 11 if [ -z "$START_ACTION" ] || echo $START_ACTION | grep -qix nothing
igor@0 12 then
igor@0 13 true
igor@0 14 else
igor@0 15 $XEN_DRBD_PATH/xen-drbd.py $START_ACTION
igor@0 16 fi
igor@0 17 ;;
igor@0 18 stop)
igor@0 19 $XEN_DRBD_PATH/xen-drbd.py migrate-all-out
igor@0 20 ;;
igor@0 21 *)
igor@0 22 echo $0 'start|stop'
igor@0 23 ;;
igor@0 24 esac
igor@0 25