#!/bin/sh
#
# Support:      linux-ha-dev@lists.tummy.com
# License:      GNU General Public License (GPL)
# This script sets the node (where it was called) to *active*
# It forces the other node to release all the held resources and lets
# this node do a takeover.
#
#       This script will only work for a two machine setup...
#       More than that and you need to vote, or something...


HA_DIR=@sysconfdir@/ha.d
. ${HA_DIR}/shellfuncs

usage() {
	echo "usage: hb_addnode <node> <node> ..."
	exit 1
}

if 
  [ $# = 0 ]
then
	usage
fi

nodelist="$@"
if [ "$nodelist" = "--help" ]; then
	usage
fi

ha_clustermsg <<-!MSG
	t=addnode
	nodelist=$nodelist
!MSG


