mirror of https://github.com/mongodb/mongo
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>
This commit is contained in:
parent
3646f02d1e
commit
188a0237bd
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue