Hi,
I've just installed postgresql-ssl and I have found that some error in its post-install script prevent it from working correctly. Back in last summer I had a long discussion with Brian Lenihan about problems in postgresql Fink's package; some of them seems to be fixed now but some are still there and prevent postgresql from starting up (either via terminal or via SystemStarter/daemonic).


The first issue regards the daemonic entry. It looks like:

#!/bin/sh
# startup script for service postgresql-ssl, created by daemonic

. /etc/rc.common

case "$1" in
  start)

ConsoleMessage "Starting PostgreSQL database server"

    if [ -x /usr/bin/sudo ]; then
      # run the daemon
      /usr/bin/sudo -u postgres /sw/bin/pgsql.sh

fi

    ;;
esac

exit 0

As far as I can understand trying to launch /sw/bin/pgsql.sh using sudo causes an error. Furthermore you must pass the "start" parameter to the pgsql.sh script, without it the script does nothing!! Eventually would be nice to insert a "stop" and a "restart" entry to the daemonic script in order to be able to use SystemStarter to stop and restart postgresql manually.

The second issue is related to the creation of /sw/var/postgresql and /sw/var/log/postgresql directories. The meaningful part of the script that creates these directory is reported below:

pg_createdb () {
...
  echo -e "- making postgresql directories: \c"
  mkdir -p %p/var/postgresql/data %p/var/log/postgresql
  chown -R postgres %p/var/postgresql %p/var/log/postgresql
  chmod 700 %p/var/postgresql
  echo "ok"
...
}

As you can see only the directories' owner is changed not the group. In this way those directories appear to be owned by the user "postgres" that belong to the "admin" group. But "postgres" user doesn't belong to that group (it belongs to "postgres" group!!) and when you try to start postgresql you get a "Permission denied" error. Changing that line to:

chown -R postgres:postgres %p/var/postgresql %p/var/log/postgresql

fix the problem.

Applying the corrections described above I was able to get postgresql server up and running. I hope you can update the Fink's package as soon as possible, if I miss something please let me know.

Cheers,
        Andrea.

---
Andrea Riciputi

"Science is like sex: sometimes something useful comes out,
  but that is not the reason we are doing it" -- (Richard Feynman)



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to