You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by cr...@apache.org on 2013/12/06 22:40:57 UTC
git commit: AMBARI-1792. Postgres init commands change on Fedora 16+
(Trevor McKay via croberts).
Updated Branches:
refs/heads/trunk 9a50f98b5 -> 764ea58e1
AMBARI-1792. Postgres init commands change on Fedora 16+ (Trevor McKay via croberts).
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/764ea58e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/764ea58e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/764ea58e
Branch: refs/heads/trunk
Commit: 764ea58e19daac317ab9d2f1bbb7d3a92fce1aed
Parents: 9a50f98
Author: Chad Roberts <cr...@redhat.com>
Authored: Fri Dec 6 16:39:28 2013 -0500
Committer: Chad Roberts <cr...@redhat.com>
Committed: Fri Dec 6 16:39:50 2013 -0500
----------------------------------------------------------------------
ambari-server/src/main/python/ambari-server.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/764ea58e/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index 35019d6..0dec041 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -242,7 +242,11 @@ if OS == OS_UBUNTU:
IP_TBLS_STATUS_CMD = "%s %s status" % (SERVICE_CMD, FIREWALL_SERVICE_NAME)
PG_ST_CMD = "%s %s status" % (SERVICE_CMD, PG_SERVICE_NAME)
-PG_INITDB_CMD = "%s %s initdb" % (SERVICE_CMD, PG_SERVICE_NAME)
+if os.path.isfile("/usr/bin/postgresql-setup"):
+ PG_INITDB_CMD = "/usr/bin/postgresql-setup initdb"
+else:
+ PG_INITDB_CMD = "%s %s initdb" % (SERVICE_CMD, PG_SERVICE_NAME)
+
PG_START_CMD = "%s %s start" % (SERVICE_CMD, PG_SERVICE_NAME)
PG_RESTART_CMD = "%s %s restart" % (SERVICE_CMD, PG_SERVICE_NAME)
PG_HBA_RELOAD_CMD = "%s %s reload" % (SERVICE_CMD, PG_SERVICE_NAME)