#!/bin/sh

source /usr/share/shaman/functions

verify_caller

if [ -z "$EVENT" ]; then
        echo "EVENT environment variable undefined" 1>&2
        exit 1
fi

[ "x$EVENT" != "xNODE_CRASH" ] && exit 0

if [ -z "$SRC_NODE_ID" ] ; then
	echo "SRC_NODE_ID environment variable undefined" 1>&2
	exit 2
fi

/usr/bin/ostor-ctl bind -H "$SRC_NODE_ID" -B 1
exit $?

