Date: Tue, 15 Feb 2005 00:55:35 +0100 From: Salvatore Montefusco <sm@brightpebbles.org> To: girgen@FreeBSD.org Cc: ports@FreeBSD.org Subject: FreeBSD Port: postgresql-server-8.0.1 Message-ID: <aeb8732f5e6dac774f578f89b7a01fdb@brightpebbles.org>
next in thread | raw e-mail | index | archive | help
Hi, I'm running Freebsd 5.3 and recently installed the postgresql-server-8.0.1 port. Adding custom postgresql_data="/somewhere" in rc.conf, I get an error when /urs/local/etc/010.pgsql.sh rc script is launched with the commands start, stop, restart, status (except initdb, which works fine). By looking at /urs/local/etc/010.pgsql.sh source and testing it with bash -x, I've found out that the problem is caused by $command_args variable, which is evaluated before postgresql_data is assigned in rc.conf. That's the reason why the script doesn't fail when you call initdb: the command doesn't use $command_args. I've got a workaround by moving $command_args assignment line in to the postgresql_command function, before calling su, but actually I don't know if it is the right way to solve the problem. postgresql_command() { command_args="-D ${postgresql_data} ${postgresql_flags} $1" su -m ${postgresql_user} -c "exec ${command} ${command_args}" } I hope it will be useful. Anyway, you do a great job everyday. Thank you and keep going. Salvatore Montefusco
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aeb8732f5e6dac774f578f89b7a01fdb>