summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2012-01-26 06:31:26 +0000
committerdougb <dougb@FreeBSD.org>2012-01-26 06:31:26 +0000
commit4e2ad84165c5fc29775444b83a7fa24dcd1a69ab (patch)
tree3024815ffb6ceae22975237f0d0b1eda57bc8be5
parent448a04687e6999a4befc46c40ff22d3defc6c3f0 (diff)
downloadFreeBSD-ports-4e2ad84165c5fc29775444b83a7fa24dcd1a69ab.zip
FreeBSD-ports-4e2ad84165c5fc29775444b83a7fa24dcd1a69ab.tar.gz
The problem previously reported on freebsd-ports@ hasn't been fixed,
and a user contacted me privately asking for a fix. This fix was proposed on the list and tested by the user who contacted me privately. The problem is that _flags can't be modified in start_precmd, and shouldn't have been abused this way in the first place. The previous version resulted in couchdb staying in the foreground. This patch could be refined further, but it solves the immediate problem.
-rw-r--r--databases/couchdb/Makefile2
-rw-r--r--databases/couchdb/files/couchdb.in11
2 files changed, 10 insertions, 3 deletions
diff --git a/databases/couchdb/Makefile b/databases/couchdb/Makefile
index f7f7aa9..7d03aeb 100644
--- a/databases/couchdb/Makefile
+++ b/databases/couchdb/Makefile
@@ -7,7 +7,7 @@
PORTNAME= couchdb
PORTVERSION= 1.1.0
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_APACHE}
diff --git a/databases/couchdb/files/couchdb.in b/databases/couchdb/files/couchdb.in
index 480c03f..eb04a0f 100644
--- a/databases/couchdb/files/couchdb.in
+++ b/databases/couchdb/files/couchdb.in
@@ -36,11 +36,18 @@ couchdb_respawn="${couchdb_respawn:-"0"}"
command="%%PREFIX%%/bin/${name}"
pidfile="/var/run/${name}/${name}.pid"
+command_args="-p ${pidfile} -b"
+
couchdb_prestart()
{
install -o $couchdb_user /dev/null $pidfile
- [ -n "$couchdb_flags" ] && return 0
+ if [ -n "$couchdb_flags" ]; then
+ case "$couchdb_flags" in
+ *-[bp]*) err 1 'The -b and -p options should be removed from couchdb_flags' ;;
+ esac
+ return 0
+ fi
if [ $couchdb_respawn -gt 0 ]; then
respawn="-r ${couchdb_respawn}"
@@ -54,7 +61,7 @@ couchdb_prestart()
errfile=/dev/null
fi
- couchdb_flags="-b -a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} -p ${pidfile}"
+ command_args="-a ${couchdb_etcdir}/default.ini -a ${couchdb_etcdir}/local.ini ${respawn} -o ${logfile} -e ${errfile} ${command_args}"
}
start_precmd=${name}_prestart
OpenPOWER on IntegriCloud