Add different pgpool.sysconfig file for RHEL6 and RHEL7.
authorpengbo <pengbo@sraoss.co.jp>
Tue, 31 Oct 2017 03:26:15 +0000 (12:26 +0900)
committerpengbo <pengbo@sraoss.co.jp>
Tue, 31 Oct 2017 04:11:07 +0000 (13:11 +0900)
In RHEL6, the "-n" option is needed to redirect log.

Reported in bug 343.

pgpool.spec
src/redhat/pgpool_rhel6.sysconfig [new file with mode: 0644]
src/redhat/pgpool_rhel7.sysconfig [moved from redhat/pgpool.sysconfig with 100% similarity]

index fdc02ff293a80ff9a35860bb369b47eab0f2717e..bb8f9e8e41caf529e75aa1c6f4e3690996ec06f9 100644 (file)
@@ -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.conf.sample.patch
 Patch2:         pgpool-II-head.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -137,7 +138,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 (file)
index 0000000..221869e
--- /dev/null
@@ -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"