pgpool2.git / summary / log / commit / refs

commit    de0d80bb24fda05977b671bbce72d9c18d597343
Author:   pengbo <pengbo@sraoss.co.jp>
Date:     Tue Oct 31 03:26:15 2017 +0000

    Add different pgpool.sysconfig file for RHEL6 and RHEL7.
    
    In RHEL6, the "-n" option is needed to redirect log.
    
    Reported in bug 343.


src/pgpool.spec | 9 +++++++-- src/redhat/pgpool_rhel6.sysconfig | 7 +++++++ pgpool_rhel7.sysconfig} | 0 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/pgpool.spec b/src/pgpool.spec index 397d0feaf..d745d3c7c 100644 --- a/src/pgpool.spec +++ b/src/pgpool.spec @@ -27,10 +27,11 @@ Vendor: Pgpool Global Development Group URL: http://www.pgppol.net/ Source0: pgpool-II-%{version}.tar.gz Source1: pgpool.init -Source2: pgpool.sysconfig +Source2: pgpool_rhel6.sysconfig %if %{systemd_enabled} Source3: pgpool.service %endif +Source4: pgpool_rhel7.sysconfig Patch1: pgpool-II-head.patch %if %{pg_version} >=94 && %{rhel} >= 7 Patch2: pgpool_socket_dir.patch @@ -134,7 +135,11 @@ install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/pgpool %endif install -d %{buildroot}%{_sysconfdir}/sysconfig -install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool +%if 0%{rhel} && 0%{rhel} <= 6 + install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/pgpool +%else + install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/pgpool +%endif # nuke libtool archive and static lib rm -f %{buildroot}%{_libdir}/libpcp.{a,la} diff --git a/src/redhat/pgpool_rhel6.sysconfig b/src/redhat/pgpool_rhel6.sysconfig new file mode 100644 index 000000000..221869e59 --- /dev/null +++ b/src/redhat/pgpool_rhel6.sysconfig @@ -0,0 +1,7 @@ +# Options for pgpool + +# -n: don't run in daemon mode. does not detatch control tty +# -d: debug mode. lots of debug information will be printed + +#OPTS=" -d -n" +OPTS=" -n" diff --git a/src/redhat/pgpool.sysconfig b/src/redhat/pgpool_rhel7.sysconfig similarity index 100% rename from src/redhat/pgpool.sysconfig rename to src/redhat/pgpool_rhel7.sysconfig [parent: ce7ff5511937]