[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at ff2e1a0bcf33050076449eb1ae69f514680ae99d

Michael DeHaan mdehaan at redhat.com
Wed Jun 6 21:18:31 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  ff2e1a0bcf33050076449eb1ae69f514680ae99d (commit)
      from  032bb9fa85b94d1f083911ef50cc8586538ce3b2 (commit)

- Log -----------------------------------------------------------------
commit ff2e1a0bcf33050076449eb1ae69f514680ae99d
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Wed Jun 6 17:19:37 2007 -0400

    Modifying vf_create_db to generate pg_hba.conf files that are more correct.
-----------------------------------------------------------------------

Diffstat:
 service/db/vf_create_db |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/service/db/vf_create_db b/service/db/vf_create_db
index 8e3f927..1f6bc0f 100755
--- a/service/db/vf_create_db
+++ b/service/db/vf_create_db
@@ -168,6 +168,8 @@ def fix_postgres_auth():
     Enable postgres to use password authentication, which is off
     by default.
     """
+    
+    subprocess.call("/sbin/service postgresql start", shell=True)
 
     # read conf file
     hba = open(PG_HBA_CONF,"r")
@@ -177,13 +179,14 @@ def fix_postgres_auth():
 
     # rewrite conf file
     hba = open(PG_HBA_CONF,"w")
+    found = False
     for line in lines:
-       for x in [ "local", "host" ]: # types of pg connections
-          if line.startswith(x):
-             if line.find("password") == -1:
-                line = line + " password" # add to EOL
-       hba.write(line)
-       hba.write("\n")
+        if line.find("md5") != -1 and line.find("local") != -1:
+           found = True
+        hba.write(line)
+        hba.write("\n")
+    if not found:
+        hba.write("local   all         all                               md5\n")
     hba.close()
 
     # restart service

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  032bb9fa85b94d1f083911ef50cc8586538ce3b2 \
  ff2e1a0bcf33050076449eb1ae69f514680ae99d




More information about the Et-mgmt-commits-list mailing list