diff options
author | Doug Barton <dougb@FreeBSD.org> | 2012-01-26 06:31:26 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2012-01-26 06:31:26 +0000 |
commit | a834d67e1a0889e67d461f32bf37a8edcc258089 (patch) | |
tree | 59703d825e2819c144081e0c5ae2847969903203 /databases/couchdb | |
parent | 0a47528de81f07d42f1a7d2e3776a4dccad3f5a7 (diff) |
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.
Notes
Notes:
svn path=/head/; revision=289828
Diffstat (limited to 'databases/couchdb')
-rw-r--r-- | databases/couchdb/Makefile | 2 | ||||
-rw-r--r-- | databases/couchdb/files/couchdb.in | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/databases/couchdb/Makefile b/databases/couchdb/Makefile index f7f7aa95e036..7d03aeb9b5d0 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 480c03ffbe30..eb04a0f7cc31 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 |