From 535e576420b1a2693058def2fb841a64ab05b6f0 Mon Sep 17 00:00:00 2001
From: Christoph Berg <myon@debian.org>
Date: Tue, 24 Jun 2014 15:00:09 +0200
Subject: [PATCH] initscript: RedHat systems will have /etc/init.d/postgresql-*
 provided by the yum.pg.o package; don't skip versions which have a
 version-specific init script here.

---
 debian/init.d-functions | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/init.d-functions b/debian/init.d-functions
index 3772ccc9..08cc6a63 100644
--- a/debian/init.d-functions
+++ b/debian/init.d-functions
@@ -92,12 +92,17 @@ status() {
 # return all installed versions which do not have their own init script
 get_versions() {
     versions=''
-    local v dir
+    local v dir skipinit
+
+    skipinit=continue
+    #redhat# skipinit=true # RedHat systems will have /etc/init.d/postgresql-* provided by the yum.pg.o package
     dir=$PGBINROOT
     #redhat# dir="-d /usr/pgsql-*"
+
     for v in `ls $dir 2>/dev/null`; do
         #redhat# v=${v#*-}
-	if [ -x $PGBINROOT$v/bin/pg_ctl ] && [ ! -x /etc/init.d/postgresql-$v ]; then
+        [ -x /etc/init.d/postgresql-$v ] && $skipinit
+        if [ -x $PGBINROOT$v/bin/pg_ctl ]; then
 	    versions="$versions $v"
 	fi
     done
-- 
GitLab