diff --git a/corosync.spec.in b/corosync.spec.in index 1c99d20a..eae317da 100644 --- a/corosync.spec.in +++ b/corosync.spec.in @@ -1,296 +1,294 @@ %global alphatag @alphatag@ %global numcomm @numcomm@ %global dirty @dirty@ # Conditionals # Invoke "rpmbuild --without " or "rpmbuild --with " # to disable or enable specific features %bcond_with testagents %bcond_with watchdog %bcond_with monitoring %bcond_with snmp %bcond_with dbus %bcond_with rdma %bcond_with systemd %bcond_with xmlconf Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: @version@ Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: BSD Group: System Environment/Base URL: http://ftp.corosync.org Source0: ftp://ftp:user@ftp.corosync.org/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz # Runtime bits Requires: corosynclib = %{version}-%{release} Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Conflicts: openais <= 0.89, openais-devel <= 0.89 # Build bits %define buildtrunk 0 %{?_with_buildtrunk: %define buildtrunk 1} BuildRequires: libqb-devel BuildRequires: nss-devel %if %{buildtrunk} BuildRequires: autoconf automake %endif %if %{with rdma} BuildRequires: libibverbs-devel librdmacm-devel %endif %if %{with snmp} BuildRequires: net-snmp-devel %endif %if %{with dbus} BuildRequires: dbus-devel %endif %if %{with systemd} BuildRequires: systemd-units %endif %if %{with xmlconf} Requires: libxslt %endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %prep %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %build %if %{buildtrunk} ./autogen.sh %endif %if %{with rdma} export ibverbs_CFLAGS=-I/usr/include/infiniband \ export ibverbs_LIBS=-libverbs \ export rdmacm_CFLAGS=-I/usr/include/rdma \ export rdmacm_LIBS=-lrdmacm \ %endif %{configure} \ %if %{with testagents} --enable-testagents \ %endif %if %{with watchdog} --enable-watchdog \ %endif %if %{with monitoring} --enable-monitoring \ %endif %if %{with snmp} --enable-snmp \ %endif %if %{with dbus} --enable-dbus \ %endif %if %{with rdma} --enable-rdma \ %endif %if %{with systemd} --enable-systemd \ %endif %if %{with xmlconf} --enable-xmlconf \ %endif --with-initddir=%{_initrddir} \ --with-systemddir=%{_unitdir} make %{_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %if %{with dbus} mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif ## tree fixup # drop static libs rm -f %{buildroot}%{_libdir}/*.a # drop docs and html docs for now rm -rf %{buildroot}%{_docdir}/* %clean rm -rf %{buildroot} %description This package contains the Corosync Cluster Engine Executive, several default APIs and libraries, default configuration files, and an init script. %post if [ $1 -eq 1 ]; then /sbin/chkconfig --add corosync || : fi %preun if [ $1 -eq 0 ]; then /sbin/service corosync stop &>/dev/null || : /sbin/chkconfig --del corosync || : fi %files %defattr(-,root,root,-) %doc LICENSE SECURITY %{_sbindir}/corosync %{_sbindir}/corosync-keygen %{_sbindir}/corosync-cmapctl %{_sbindir}/corosync-cfgtool -%{_sbindir}/corosync-fplay %{_sbindir}/corosync-cpgtool %{_sbindir}/corosync-quorumtool %{_sbindir}/corosync-notifyd %{_bindir}/corosync-blackbox %if %{with xmlconf} %{_bindir}/corosync-xmlproc %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example %dir %{_datadir}/corosync %dir %{_datadir}/corosync/xml2conf.xsl %{_mandir}/man8/corosync-xmlproc.8* %{_mandir}/man5/corosync.xml.5* %endif %dir %{_sysconfdir}/corosync %dir %{_sysconfdir}/corosync/uidgid.d %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu %if %{with dbus} %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf %endif %if %{with snmp} %{_datadir}/snmp/mibs/COROSYNC-MIB.txt %endif %if %{with systemd} %{_unitdir}/corosync.service %{_unitdir}/corosync-notifyd.service %dir %{_datadir}/corosync %{_datadir}/corosync/corosync %{_datadir}/corosync/corosync-notifyd %else %{_initrddir}/corosync %{_initrddir}/corosync-notifyd %endif %dir %{_localstatedir}/lib/corosync %dir %{_localstatedir}/log/cluster %{_mandir}/man8/corosync_overview.8* %{_mandir}/man8/corosync.8* %{_mandir}/man8/corosync-blackbox.8* %{_mandir}/man8/corosync-cmapctl.8* %{_mandir}/man8/corosync-keygen.8* %{_mandir}/man8/corosync-cfgtool.8* %{_mandir}/man8/corosync-cpgtool.8* -%{_mandir}/man8/corosync-fplay.8* %{_mandir}/man8/corosync-notifyd.8* %{_mandir}/man8/corosync-quorumtool.8* %{_mandir}/man5/corosync.conf.5* %{_mandir}/man5/votequorum.5* %{_mandir}/man8/cmap_keys.8* # optional testagent rpm # %if %{with testagents} %package -n corosync-testagents Summary: The Corosync Cluster Engine Test Agents Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description -n corosync-testagents This package contains corosync test agents. %files -n corosync-testagents %defattr(755,root,root,-) %{_datadir}/corosync/tests/mem_leak_test.sh %{_datadir}/corosync/tests/net_breaker.sh %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh %{_datadir}/corosync/tests/shm_leak_audit.sh %{_bindir}/cpg_test_agent %{_bindir}/sam_test_agent %{_bindir}/votequorum_test_agent %endif # library # %package -n corosynclib Summary: The Corosync Cluster Engine Libraries Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description -n corosynclib This package contains corosync libraries. %files -n corosynclib %defattr(-,root,root,-) %doc LICENSE %{_libdir}/libcfg.so.* %{_libdir}/libcpg.so.* %{_libdir}/libcmap.so.* %{_libdir}/libtotem_pg.so.* %{_libdir}/libquorum.so.* %{_libdir}/libvotequorum.so.* %{_libdir}/libsam.so.* %{_libdir}/libcorosync_common.so.* %post -n corosynclib -p /sbin/ldconfig %postun -n corosynclib -p /sbin/ldconfig %package -n corosynclib-devel Summary: The Corosync Cluster Engine Development Kit Group: Development/Libraries Requires: corosynclib = %{version}-%{release} Requires: pkgconfig Provides: corosync-devel = %{version} Obsoletes: corosync-devel < 0.92-7 %description -n corosynclib-devel This package contains include files and man pages used to develop using The Corosync Cluster Engine APIs. %files -n corosynclib-devel %defattr(-,root,root,-) %doc LICENSE %dir %{_includedir}/corosync/ %{_includedir}/corosync/corodefs.h %{_includedir}/corosync/cfg.h %{_includedir}/corosync/cmap.h %{_includedir}/corosync/corotypes.h %{_includedir}/corosync/cpg.h %{_includedir}/corosync/hdb.h %{_includedir}/corosync/sam.h %{_includedir}/corosync/quorum.h %{_includedir}/corosync/votequorum.h %dir %{_includedir}/corosync/totem/ %{_includedir}/corosync/totem/totem.h %{_includedir}/corosync/totem/totemip.h %{_includedir}/corosync/totem/totempg.h %{_libdir}/libcfg.so %{_libdir}/libcpg.so %{_libdir}/libcmap.so %{_libdir}/libtotem_pg.so %{_libdir}/libquorum.so %{_libdir}/libvotequorum.so %{_libdir}/libsam.so %{_libdir}/libcorosync_common.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man3/cpg_*3* %{_mandir}/man3/quorum_*3* %{_mandir}/man3/votequorum_*3* %{_mandir}/man3/sam_*3* %{_mandir}/man8/cpg_overview.8* %{_mandir}/man8/votequorum_overview.8* %{_mandir}/man8/sam_overview.8* %{_mandir}/man3/cmap_*3* %{_mandir}/man8/cmap_overview.8* %{_mandir}/man8/quorum_overview.8* %changelog * @date@ Autotools generated version - @version@-1-@numcomm@.@alphatag@.@dirty@ - Autotools generated version diff --git a/man/Makefile.am b/man/Makefile.am index 28936b9f..946a9b30 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,169 +1,168 @@ # Copyright (c) 2004 MontaVista Software, Inc. # Copyright (c) 2009, 2012 Red Hat, Inc. # # Authors: Steven Dake (sdake@redhat.com) # Fabio M. Di Nitto (fdinitto@redhat.com) # # All rights reserved. # # This software licensed under BSD license, the text of which follows: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # - Neither the name of the MontaVista Software, Inc. nor the names of its # contributors may be used to endorse or promote products derived from this # software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGE. MAINTAINERCLEANFILES = Makefile.in xml_man = corosync-xmlproc.8 \ corosync.xml.5 INDEX_HTML = index.html autogen_man = cpg_context_get.3 \ cpg_context_set.3 \ cpg_dispatch.3 \ cpg_fd_get.3 \ cpg_finalize.3 \ cpg_initialize.3 \ cpg_join.3 \ cpg_leave.3 \ cpg_local_get.3 \ cpg_mcast_joined.3 \ cpg_model_initialize.3 \ cpg_zcb_mcast_joined.3 \ cpg_zcb_alloc.3 \ cpg_zcb_free.3 \ cpg_membership_get.3 \ cpg_iteration_finalize.3 \ cpg_iteration_initialize.3 \ cpg_iteration_next.3 \ quorum_initialize.3 \ quorum_finalize.3 \ quorum_fd_get.3 \ quorum_dispatch.3 \ quorum_context_get.3 \ quorum_context_set.3 \ quorum_getquorate.3 \ quorum_trackstart.3 \ quorum_trackstop.3 \ votequorum_dispatch.3 \ votequorum_fd_get.3 \ votequorum_context_get.3 \ votequorum_context_set.3 \ votequorum_finalize.3 \ votequorum_getinfo.3 \ votequorum_initialize.3 \ votequorum_setexpected.3 \ votequorum_setvotes.3 \ votequorum_trackstart.3 \ votequorum_trackstop.3 \ sam_data_getsize.3 \ sam_data_restore.3 \ sam_data_store.3 \ sam_finalize.3 \ sam_hc_callback_register.3 \ sam_hc_send.3 \ sam_initialize.3 \ sam_mark_failed.3 \ sam_register.3 \ sam_start.3 \ sam_stop.3 \ sam_warn_signal_set.3 \ cmap_context_get.3 \ cmap_dec.3 \ cmap_iter_init.3 \ cmap_get.3 \ cmap_inc.3 \ cmap_set.3 \ cmap_iter_next.3 \ cmap_delete.3 \ cmap_iter_finalize.3 \ cmap_finalize.3 \ cmap_dispatch.3 \ cmap_initialize.3 \ cmap_track_add.3 \ cmap_context_set.3 \ cmap_fd_get.3 \ cmap_track_delete.3 autogen_common = ipc_common.sh.errors EXTRA_DIST = $(INDEX_HTML) \ $(xml_man) \ $(autogen_man:%=%.in) \ $(autogen_common) man_MANS = $(autogen_man) dist_man_MANS = corosync.conf.5 \ votequorum.5 \ corosync.8 \ corosync-cmapctl.8 \ corosync-blackbox.8 \ corosync-keygen.8 \ corosync-cfgtool.8 \ corosync-cpgtool.8 \ - corosync-fplay.8 \ corosync-notifyd.8 \ corosync-quorumtool.8 \ corosync_overview.8 \ cpg_overview.8 \ quorum_overview.8 \ votequorum_overview.8 \ sam_overview.8 \ cmap_overview.8 \ cmap_keys.8 if INSTALL_XMLCONF dist_man_MANS += $(xml_man) endif HTML_DOCS = $(dist_man_MANS:%=%.html) $(man_MANS:%=%.html) # developer man page generation %.3: %.3.in $(autogen_common) $(top_srcdir)/build-aux/genman @echo Generating $@ man page && \ rm -f $@-t $@ && \ $(top_srcdir)/build-aux/genman \ $(srcdir)/$@.in \ $(builddir)/$@-t \ $(srcdir)/$(autogen_common) && \ mv $@-t $@ clean-local: rm -rf $(HTML_DOCS) $(autogen_man) if BUILD_HTML_DOCS %.html: % $(GROFF) -mandoc -Thtml $^ > $@ install-data-local: $(INSTALL) -d $(DESTDIR)/${docdir}/html $(INSTALL) -m644 ${srcdir}/$(INDEX_HTML) $(HTML_DOCS) $(DESTDIR)/${docdir}/html/ uninstall-local: cd $(DESTDIR)/${docdir}/html && rm -f $(INDEX_HTML) $(HTML_DOCS) rmdir $(DESTDIR)/${docdir}/html 2> /dev/null || : all-local: $(HTML_DOCS) endif diff --git a/man/corosync-fplay.8 b/man/corosync-fplay.8 deleted file mode 100644 index 37fb91a7..00000000 --- a/man/corosync-fplay.8 +++ /dev/null @@ -1,66 +0,0 @@ -.\"/* -.\" * Copyright (C) 2010 Red Hat, Inc. -.\" * -.\" * All rights reserved. -.\" * -.\" * Author: Angus Salkeld -.\" * -.\" * This software licensed under BSD license, the text of which follows: -.\" * -.\" * Redistribution and use in source and binary forms, with or without -.\" * modification, are permitted provided that the following conditions are met: -.\" * -.\" * - Redistributions of source code must retain the above copyright notice, -.\" * this list of conditions and the following disclaimer. -.\" * - Redistributions in binary form must reproduce the above copyright notice, -.\" * this list of conditions and the following disclaimer in the documentation -.\" * and/or other materials provided with the distribution. -.\" * - Neither the name of Red Hat, Inc. nor the names of its -.\" * contributors may be used to endorse or promote products derived from this -.\" * software without specific prior written permission. -.\" * -.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -.\" * THE POSSIBILITY OF SUCH DAMAGE. -.\" */ -.TH COROSYNC-FPLAY 8 2010-05-30 -.SH NAME -corosync-fplay \- Display "flight data" from the corosync "blackbox". -.SH SYNOPSIS -.B "corosync-fplay" -.SH DESCRIPTION -.B corosync-fplay -Print out the logs (including debug logs) that were recorded before the last corosync crash. -.SH EXAMPLES -.TP -Get info to help developers diagnose a crash. -.br -$ corosync-fplay -.br -Starting replay: head [74205] tail [0] -.br -rec=[1] Log Message=Corosync Cluster Engine ('1.2.1'): started and ready to provide service. -.br -[...] -.br -rec=[2607] Log Message=Delivering MCAST message with seq a to pending delivery queue -.br -rec=[2608] Log Message=downlist received left_list: 2 -.br -rec=[2609] Log Message=chosen downlist from node r(0) ip(192.168.100.11) -.br -Finishing replay: records found [2609] -.br -.SH SEE ALSO -.BR corosync_overview (8), -.SH AUTHOR -Angus Salkeld -.PP diff --git a/tools/.gitignore b/tools/.gitignore index c63290e0..6614c426 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1,8 +1,9 @@ corosync-cfgtool corosync-cpgtool corosync-fplay corosync-keygen corosync-quorumtool corosync-notifyd corosync-cmapctl corosync-xmlproc +corosync-blackbox diff --git a/tools/Makefile.am b/tools/Makefile.am index 5cd738b0..6e689f64 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,80 +1,83 @@ # Copyright (c) 2009 Red Hat, Inc. # # Authors: Andrew Beekhof # Steven Dake (sdake@redhat.com) # # This software licensed under BSD license, the text of which follows: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # - Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # - Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # - Neither the name of the MontaVista Software, Inc. nor the names of its # contributors may be used to endorse or promote products derived from this # software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF # THE POSSIBILITY OF SUCH DAMAGE. MAINTAINERCLEANFILES = Makefile.in INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/include/corosync -sbin_PROGRAMS = corosync-fplay corosync-cfgtool \ +sbin_PROGRAMS = corosync-cfgtool \ corosync-keygen \ corosync-cpgtool corosync-quorumtool \ corosync-notifyd corosync-cmapctl bin_SCRIPTS = corosync-blackbox if INSTALL_XMLCONF bin_SCRIPTS += corosync-xmlproc endif corosync-xmlproc: corosync-xmlproc.sh sed -e 's#@''DATADIR@#${datadir}#g' $< > $@ -EXTRA_DIST = $(bin_SCRIPTS) corosync-xmlproc.sh corosync-notifyd.sysconfig.example +corosync-blackbox: corosync-blackbox.sh + sed -e 's#@''LOCALSTATEDIR@#${localstatedir}#g' $< > $@ + + +EXTRA_DIST = $(bin_SCRIPTS) corosync-xmlproc.sh corosync-notifyd.sysconfig.example \ + corosync-blackbox.sh COMMON_OPTS = -L../lib -L../common_lib -Wl,-rpath,../common_lib corosync_cmapctl_LDFLAGS= $(COMMON_OPTS) corosync_cmapctl_LDADD = -lcorosync_common -lcmap $(LIBQB_LIBS) -corosync_fplay_LDADD = $(LIBQB_LIBS) - corosync_cfgtool_LDFLAGS= $(COMMON_OPTS) corosync_cfgtool_LDADD = -lcfg $(LIBQB_LIBS) corosync_cpgtool_LDFLAGS= $(COMMON_OPTS) corosync_cpgtool_LDADD = -lcfg -lcpg $(LIBQB_LIBS) corosync_quorumtool_LDFLAGS = $(COMMON_OPTS) corosync_quorumtool_LDADD = -lcmap -lcfg -lquorum -lcorosync_common \ -lvotequorum $(LIBQB_LIBS) corosync_notifyd_CPPFLAGS = $(DBUS_CFLAGS) corosync_notifyd_LDFLAGS = $(COMMON_OPTS) corosync_notifyd_LDADD = -lcfg -lcmap \ $(LIBQB_LIBS) $(DBUS_LIBS) $(SNMPLIBS) \ -lquorum lint: -splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(INCLUDES) $(CFLAGS) *.c clean-local: - rm -f corosync-xmlproc + rm -f corosync-xmlproc corosync-blackbox diff --git a/tools/corosync-blackbox b/tools/corosync-blackbox.sh old mode 100755 new mode 100644 similarity index 97% rename from tools/corosync-blackbox rename to tools/corosync-blackbox.sh index 15a97e3b..fb5ce96f --- a/tools/corosync-blackbox +++ b/tools/corosync-blackbox.sh @@ -1,35 +1,34 @@ #!/bin/sh # Copyright (c) 2010 Red Hat, Inc. # # Authors: Angus Salkeld - * - * This software licensed under BSD license, the text of which follows: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - Neither the name of the MontaVista Software, Inc. nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include -#include - -int main (void) -{ - qb_log_init("fplay", LOG_USER, LOG_INFO); - - qb_log_filter_ctl(QB_LOG_STDERR, QB_LOG_FILTER_ADD, - QB_LOG_FILTER_FILE, __FILE__, LOG_INFO); - qb_log_format_set(QB_LOG_STDERR, "%f:%l [%p] %b"); - qb_log_ctl(QB_LOG_SYSLOG, QB_LOG_CONF_ENABLED, QB_FALSE); - qb_log_ctl(QB_LOG_STDERR, QB_LOG_CONF_ENABLED, QB_TRUE); - - qb_log_blackbox_print_from_file(LOCALSTATEDIR "/lib/corosync/fdata"); - return 0; -}