xen-drbd

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/init.d-xen-drbd	Thu Sep 27 18:56:29 2007 +0300
     1.3 @@ -0,0 +1,25 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +XEN_DRBD_PATH='/usr/bin'
     1.7 +TOPOLOGY_NAME='xen-drbd'
     1.8 +START_ACTION='nothing'
     1.9 +[ -e /etc/default/xen-drbd ] && . /etc/default/xen-drbd
    1.10 +
    1.11 +case $1 in
    1.12 +		start)
    1.13 +			$XEN_DRBD_PATH/xen-drbd-install.py ${TOPOLOGY_NAME} make-links | sh -s
    1.14 +			if [ -z "$START_ACTION" ] || echo $START_ACTION | grep -qix nothing 
    1.15 +			then
    1.16 +				true
    1.17 +			else
    1.18 +				$XEN_DRBD_PATH/xen-drbd.py $START_ACTION
    1.19 +			fi
    1.20 +		;;
    1.21 +		stop)
    1.22 +			$XEN_DRBD_PATH/xen-drbd.py migrate-all-out
    1.23 +		;;
    1.24 +		*)
    1.25 +			echo $0 'start|stop'
    1.26 +		;;
    1.27 +esac
    1.28 +