summaryrefslogtreecommitdiff
path: root/rpm/init.d-mongod.suse
diff options
context:
space:
mode:
authorSam Kleinman <samk@10gen.com>2016-01-19 11:51:36 -0500
committerSam Kleinman <samk@10gen.com>2016-02-09 13:17:41 -0500
commit985e2a0be95709ac064c57f0a9bb385a55937285 (patch)
tree640cabbfa77d72dbf7b8d068403009b347253070 /rpm/init.d-mongod.suse
parent8a58e2fb57806c0ccd415773d490167e783941bf (diff)
downloadmongo-985e2a0be95709ac064c57f0a9bb385a55937285.tar.gz
SERVER-20930 SERVER-20404: clarify sysconfig and default config override
Diffstat (limited to 'rpm/init.d-mongod.suse')
-rw-r--r--rpm/init.d-mongod.suse16
1 files changed, 8 insertions, 8 deletions
diff --git a/rpm/init.d-mongod.suse b/rpm/init.d-mongod.suse
index 2d35e8032c3..fae1fb8b3f3 100644
--- a/rpm/init.d-mongod.suse
+++ b/rpm/init.d-mongod.suse
@@ -16,28 +16,24 @@
. /etc/rc.status
rc_reset
-# things from mongod.conf get there by mongod reading it
-
-
# NOTE: if you change any OPTIONS here, you get what you pay for:
# this script assumes all options are in the config file.
CONFIGFILE="/etc/mongod.conf"
OPTIONS=" -f $CONFIGFILE"
-SYSCONFIG="/etc/sysconfig/mongod"
-
-PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'" | awk -F'#' '{print $1}'`
mongod=${MONGOD-/usr/bin/mongod}
MONGO_USER=mongod
MONGO_GROUP=mongod
+# All variables set before this point can be overridden by users, by
+# setting them directly in the SYSCONFIG file. Use this to explicitly
+# override these values, at your own risk.
+SYSCONFIG="/etc/sysconfig/mongod"
if [ -f "$SYSCONFIG" ]; then
. "$SYSCONFIG"
fi
-PIDDIR=`dirname $PIDFILEPATH`
-
# Handle NUMA access to CPUs (SERVER-3574)
# This verifies the existence of numactl as well as testing that the command works
NUMACTL_ARGS="--interleave=all"
@@ -48,6 +44,10 @@ else
NUMACTL=""
fi
+# things from mongod.conf get there by mongod reading it
+PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'" | awk -F'#' '{print $1}'`
+PIDDIR=`dirname $PIDFILEPATH`
+
start()
{