support openstack database access to pg_hba.conf
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 10 Jan 2012 18:10:08 +0000 (13:10 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Tue, 10 Jan 2012 18:10:08 +0000 (13:10 -0500)
init.d/sfa

index 475b821..32cc1a0 100755 (executable)
@@ -167,6 +167,10 @@ function db_start () {
            echo "host $SFA_DB_NAME $SFA_DB_USER 127.0.0.1/32 password"
            [ -n "$registry_ip" ] && echo "host $SFA_DB_NAME $SFA_DB_USER ${registry_ip}/32 password"
        ) >>$pghba_conf
+
+    if [ "$SFA_GENERIC_FLAVOUR" == "openstack" ] ; then
+        [ -n "$registry_ip" ] && echo "host nova nova ${registry_ip}/32 password" >> $pghba_conf
+    fi   
        
        # Fix ownership (sed -i changes it)
        chown postgres:postgres $postgresql_conf $pghba_conf