summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
Diffstat (limited to 'rpm')
-rwxr-xr-xrpm/init.d-mongod2
-rw-r--r--rpm/init.d-mongod.suse3
2 files changed, 3 insertions, 2 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod
index 563f4fd0e3f..54308cccc0b 100755
--- a/rpm/init.d-mongod
+++ b/rpm/init.d-mongod
@@ -19,7 +19,7 @@ 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:]'`
+PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'"`
mongod=${MONGOD-/usr/bin/mongod}
diff --git a/rpm/init.d-mongod.suse b/rpm/init.d-mongod.suse
index 73de7487df8..746177c85d9 100644
--- a/rpm/init.d-mongod.suse
+++ b/rpm/init.d-mongod.suse
@@ -25,7 +25,8 @@ CONFIGFILE="/etc/mongod.conf"
OPTIONS=" -f $CONFIGFILE"
SYSCONFIG="/etc/sysconfig/mongod"
-PIDFILEPATH=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"`
+PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'"`
+
mongod=${MONGOD-/usr/bin/mongod}
MONGO_USER=mongod