summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorBrian Samek <brian.samek@mongodb.com>2016-10-12 16:58:33 -0400
committerBrian Samek <brian.samek@mongodb.com>2016-10-13 11:13:16 -0400
commit1fcd8435b8c52fa4284be51d8c44a273f0db5382 (patch)
treec17d6e68c276e2c0beca26f89cd72e15428cbcb8 /rpm
parent0344a7542f9318730cce289fe143295f6f99b4f8 (diff)
downloadmongo-1fcd8435b8c52fa4284be51d8c44a273f0db5382.tar.gz
SERVER-26575 Quote PIDFILEPATH
Diffstat (limited to 'rpm')
-rwxr-xr-xrpm/init.d-mongod4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod
index 18b0d88df0d..19d9bf90adb 100755
--- a/rpm/init.d-mongod
+++ b/rpm/init.d-mongod
@@ -38,7 +38,7 @@ else
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}'`
+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()
@@ -49,7 +49,7 @@ start()
fi
# Make sure the pidfile does not exist
- if [ -f $PIDFILEPATH ]; then
+ if [ -f "$PIDFILEPATH" ]; then
echo "Error starting mongod. $PIDFILEPATH exists."
RETVAL=1
return