Index: installers/debian/dotlrn/config =================================================================== RCS file: /usr/local/cvsroot/installers/debian/dotlrn/config,v diff -u -N -r1.2 -r1.3 --- installers/debian/dotlrn/config 1 Apr 2008 10:35:41 -0000 1.2 +++ installers/debian/dotlrn/config 18 Sep 2008 18:29:35 -0000 1.3 @@ -7,7 +7,7 @@ db_capb backup STATE=1 -while [ "$STATE" != 0 -a "$STATE" != 12 ] +while [ "$STATE" != 0 -a "$STATE" != 13 ] do case "$STATE" in 1) @@ -17,6 +17,7 @@ if [ ! -z "$RET" ]; then STATE=2 fi + pg_host="$RET" else STATE=1 fi @@ -73,6 +74,7 @@ if [ ! -z "$RET" ]; then STATE=7 fi + pg_user="$RET" else STATE=2 fi @@ -97,7 +99,18 @@ if [ "$RET" != "$CONFIRM" ]; then STATE=9 else - STATE=10 + # Check if host is localhost, user is not www-data and password is not null, + # to change the postgresql access permissions properly. + if { [ "$pg_host" = "localhost" ] && [ "$pg_user" != "www-data" ]; } then + STATE=10 + if [ "A$RET" != "A" ]; then + pg_pass_blank="false" + else + pg_pass_blank="true" + fi + else + STATE=11 + fi fi else STATE=6 @@ -110,7 +123,21 @@ STATE=6 ;; - 10) + + 10) db_input critical dotlrn/pg_grant_access || true + db_go + db_get dotlrn/pg_grant_access || true + if [ "$RET" = false ]; then + if [ "$pg_pass_blank" = "true" ]; then + db_input critical dotlrn/pg_grant_access_manual_blank_pass || true + else + db_input critical dotlrn/pg_grant_access_manual || true + fi + fi + STATE=11 + ;; + + 11) # Check if tsearch tables exists dbname=template1 db_get dotlrn/db_host @@ -137,13 +164,13 @@ err=1 echo $error fi - STATE=11 + STATE=12 ;; - 11) + 12) db_input critical dotlrn/create_tables || true db_go - STATE=12 + STATE=13 ;; esac done