forked from Lainports/freebsd-ports
- add net/pacemaker2 (2.0.0-rc4) - net/corosync -> net/corosync2 (update to 2.4.4) - net/pacemaker -> net/pacemaker1 (update to 1.1.18) - add USES=corosync to deal with multiple versions PR: 228164, 228165 Submitted by: David Shane Holden <dpejesh@yahoo.com>
35 lines
702 B
Bash
35 lines
702 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: pacemaker
|
|
# REQUIRE: corosync
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="pacemaker"
|
|
rcvar="pacemaker_enable"
|
|
start_precmd="pacemaker_precmd"
|
|
|
|
load_rc_config $name
|
|
|
|
: ${pacemaker_enable:=NO}
|
|
: ${pacemaker_ipc_buffer:=0}
|
|
|
|
pidfile="/var/run/pacemakerd.pid"
|
|
procname="%%PREFIX%%/sbin/pacemakerd"
|
|
command="/usr/sbin/daemon"
|
|
command_args="-f -p ${pidfile} ${procname}"
|
|
|
|
pacemaker_precmd()
|
|
{
|
|
if [ `${SYSCTL_N} kern.ipc.maxsockbuf` -lt 18874368 ]; then
|
|
err 3 "sysctl:kern.ipc.maxsockbuf must be at least 18874368"
|
|
fi
|
|
|
|
export PATH="${PATH}:/usr/local/sbin:/usr/local/bin"
|
|
export PCMK_ipc_buffer=${pacemaker_ipc_buffer}
|
|
export PCMK_ipc_type=socket
|
|
}
|
|
|
|
run_rc_command "$1"
|