summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorAricg <actual@aricgardner.com>2013-05-31 16:11:22 -0400
committerErnie Hershey <ernie.hershey@10gen.com>2013-07-31 17:30:00 -0400
commit188a0237bdbb84d308373f024a9a43e7d4715ef4 (patch)
tree3be2068047474ed0655b2dcd6bcaa7b2ac85885e /debian
parent3646f02d1e89c9ab478a2a3ace18c48e237b2803 (diff)
downloadmongo-188a0237bdbb84d308373f024a9a43e7d4715ef4.tar.gz
SERVER-6008 put the logic for DAEMON_OPTS= and -- into the "if which numactl"
I hope this is correct, I have signed the contributor's agreement. Signed-off-by: Ernie Hershey <ernie.hershey@10gen.com>
Diffstat (limited to 'debian')
-rw-r--r--debian/init.d7
1 files changed, 4 insertions, 3 deletions
diff --git a/debian/init.d b/debian/init.d
index c98038220d0..0bff3f868cb 100644
--- a/debian/init.d
+++ b/debian/init.d
@@ -68,9 +68,11 @@ fi
NUMACTL_ARGS="--interleave=all"
if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
then
- NUMACTL="numactl $NUMACTL_ARGS"
+ NUMACTL="`which numactl` -- $NUMACTL_ARGS"
+ DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}
else
NUMACTL=""
+ DAEMON_OPTS=${DAEMON_OPTS:-"-- --config $CONF"}
fi
if test ! -x $DAEMON; then
@@ -91,7 +93,6 @@ DIETIME=10 # Time to wait for the server to die, in seconds
# 'restart' will not work
DAEMONUSER=${DAEMONUSER:-mongodb}
-DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}
set -e
@@ -122,7 +123,7 @@ start_server() {
# Start the process using the wrapper
start-stop-daemon --background --start --quiet --pidfile $PIDFILE \
--make-pidfile --chuid $DAEMONUSER \
- --exec $NUMACTL $DAEMON -- $DAEMON_OPTS
+ --exec $NUMACTL $DAEMON $DAEMON_OPTS
errcode=$?
return $errcode
}