mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 tools/corosync-notifyd.sysconfig.example \
%{buildroot}%{_sysconfdir}/sysconfig/corosync-notifyd
+# /etc/sysconfig/corosync
+install -m 644 init/corosync.sysconfig.example \
+ %{buildroot}%{_sysconfdir}/sysconfig/corosync
%clean
rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
%config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
+%config(noreplace) %{_sysconfdir}/sysconfig/corosync
%if %{with dbus}
%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
%endif
MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = corosync.in corosync-notifyd.in corosync.service.in corosync-notifyd.service.in corosync.conf.in corosync-notifyd.conf.in
+EXTRA_DIST = corosync.in corosync-notifyd.in corosync.service.in \
+ corosync-notifyd.service.in corosync.conf.in corosync-notifyd.conf.in \
+ corosync.sysconfig.example
if INSTALL_SYSTEMD
systemdconfdir = $(SYSTEMDDIR)
wait_for_ipc()
{
try=0
- while [ "$try" -le "20" ]; do
+ max_try=$((COROSYNC_INIT_TIMEOUT*2-1))
+ [ "$max_try" -le "0" ] && max_try=120
+
+ while [ "$try" -le "$max_try" ]; do
if corosync-cfgtool -s > /dev/null 2>&1; then
return 0
fi
if status $prog > /dev/null 2>&1; then
success
else
- $prog > /dev/null 2>&1
+ $prog $COROSYNC_OPTIONS > /dev/null 2>&1
if ! wait_for_ipc; then
failure
--- /dev/null
+# Corosync init script configuration file
+
+# COROSYNC_INIT_TIMEOUT specifies number of seconds to wait for corosync
+# initialization (default is one minute).
+COROSYNC_INIT_TIMEOUT=60
+
+# COROSYNC_OPTIONS specifies options passed to corosync command
+# (default is no options).
+# See "man corosync" for detailed descriptions of the options.
+COROSYNC_OPTIONS=""