[cumin] Patch cumin-database to use postgresql-setup initdb if available
Trevor McKay
tmckay at fedoraproject.org
Fri Jan 13 14:46:31 UTC 2012
commit de7a881a43bcb543478e6d020fd3fd1d7f24ab9b
Author: tmckay <tmckay at redhat.com>
Date: Fri Jan 13 09:45:23 2012 -0500
Patch cumin-database to use postgresql-setup initdb if available
cumin-database.patch | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/cumin-database.patch b/cumin-database.patch
new file mode 100644
index 0000000..4fb555f
--- /dev/null
+++ b/cumin-database.patch
@@ -0,0 +1,26 @@
+Index: cumin/bin/cumin-database
+===================================================================
+--- cumin/bin/cumin-database (revision 5181)
++++ cumin/bin/cumin-database (working copy)
+@@ -233,11 +233,16 @@
+ # will leave the service running, which is different than initdb,
+ # but that is fine at this point because it is restarted after
+ # the call to configure anyway.
+- echo -e "\nAttempting to use initdb option..."
+- run "/sbin/service postgresql initdb" || {
+- echo -e "\ninitdb option not supported, using start..."
+- run "/sbin/service postgresql start"
+- }
++ if [[ -f "/usr/bin/postgresql-setup" ]]; then
++ echo -e "using postgresql-setup..."
++ run "/usr/bin/postgresql-setup initdb"
++ else
++ echo -e "\nAttempting to use initdb option..."
++ run "/sbin/service postgresql initdb" || {
++ echo -e "\ninitdb option not supported, using start..."
++ run "/sbin/service postgresql start"
++ }
++ fi
+
+ # now check again, to make sure one of the two methods worked
+ check-initialized &> /dev/null || {
More information about the scm-commits
mailing list