xen-drbd

annotate init.d-xen-drbd @ 37:e80bdf496aa2

1. --network (-n) option; topology name is not hardcoded since present
2. fix for incorrect processing of the paramater spicified in form like drbd8=sda1 in xen-drbd-install
author igor@manas.xt.vpn
date Mon Sep 15 10:03:24 2008 +0300 (2008-09-15)
parents cbd4d942d059
children
rev   line source
igor@0 1 #!/bin/sh
igor@0 2
igor@0 3 XEN_DRBD_PATH='/usr/bin'
igor@37 4 TOPOLOGY_NAME='network'
igor@0 5 START_ACTION='nothing'
eb@1 6 STOP_ACTION='nothing'
igor@0 7 [ -e /etc/default/xen-drbd ] && . /etc/default/xen-drbd
igor@0 8
igor@0 9 case $1 in
igor@0 10 start)
igor@37 11 $XEN_DRBD_PATH/xen-drbd-install --network=${TOPOLOGY_NAME} make-links | sh -s
igor@0 12 if [ -z "$START_ACTION" ] || echo $START_ACTION | grep -qix nothing
igor@0 13 then
igor@0 14 true
igor@0 15 else
igor@37 16 $XEN_DRBD_PATH/xen-drbd --network=${TOPOLOGY_NAME} $START_ACTION
igor@0 17 fi
igor@0 18 ;;
igor@0 19 stop)
eb@5 20 if [ -z "$STOP_ACTION" ] || echo $STOP_ACTION | grep -qix nothing
eb@5 21 then
eb@5 22 true
eb@5 23 else
igor@37 24 $XEN_DRBD_PATH/xen-drbd --network=${TOPOLOGY_NAME} $STOP_ACTION
eb@5 25 fi
igor@0 26 ;;
igor@0 27 *)
igor@0 28 echo $0 'start|stop'
igor@0 29 ;;
igor@0 30 esac
igor@0 31