#!/bin/bash
#
# This STONITH script integrates a cluster running within DomUs
# with the CRM/Pacemaker cluster running in Dom0.
#
# Author:	Lars Marowsky-Bree
# Copyright:	2008 Lars Marowsky-Bree
# License:      GNU General Public License (GPL)
#

SSH_COMMAND="/usr/bin/ssh -q -x -n"
HVM_HELPER="/usr/lib/stonith/plugins/xen0-ha-dom0-stonith-helper"

# Rewrite the hostlist to accept "," as a delimeter for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hostlist=`echo $hostlist | tr ',' ' '`

# Rtr for hostnames too.
hos