Hello,
I made some small improvements to the suggested init.d script for fence daemon.
Please, review against Debian Policy and include it at the package.
Regards.
Andre Felipe Machado
http://www.techforce.com.br
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="fencing domain"
NAME=fence
test -x /sbin/fence_tool || exit 0
if [ -f /etc/default/fence ] ; then
. /etc/default/fence
fi
set -e
fence_start()
{
echo -n "Starting $DESC: "
fence_tool join
echo "."
}
fence_stop()
{
echo -n "Stopping $DESC: "
fence_tool leave
echo "."
}
case "$1" in
start)
fence_start
;;
stop)
fence_stop
;;
restart|force-reload)
if fence_stop ; then
sleep 1
fi
fence_start
;;
*)
echo "Usage: invoke-rc.d $NAME {start|stop|restart}" >&2
exit 1
;;
esac
exit 0