diff options
author | Ernie Hershey <ernie.hershey@10gen.com> | 2014-05-09 16:29:57 -0400 |
---|---|---|
committer | Ernie Hershey <ernie.hershey@10gen.com> | 2014-05-13 17:55:10 -0400 |
commit | 5368b375128302c1bb32ec7c5e6d5b7e6c5cd38b (patch) | |
tree | 3926d708cddfd6a7b9468ba29ffebc76369009df /rpm | |
parent | a503b4b57e57f81bebddd07ed75cf116f23de350 (diff) | |
download | mongo-5368b375128302c1bb32ec7c5e6d5b7e6c5cd38b.tar.gz |
SERVER-13595 Adjust rpm init script awk line to read new yaml config file format
Diffstat (limited to 'rpm')
-rw-r--r-- | rpm/init.d-mongod | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpm/init.d-mongod b/rpm/init.d-mongod index 0d7aaa555fc..5e9afc785a8 100644 --- a/rpm/init.d-mongod +++ b/rpm/init.d-mongod @@ -22,8 +22,9 @@ SYSCONFIG="/etc/sysconfig/mongod" # FIXME: 1.9.x has a --shutdown flag that parses the config file and # shuts down the correct running pid, but that's unavailable in 1.8 # for now. This can go away when this script stops supporting 1.8. -DBPATH=`awk -F= '/^dbpath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"` -PIDFILE=`awk -F= '/^pidfilepath[[:blank:]]*=[[:blank:]]*/{print $2}' "$CONFIGFILE"` +DBPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*dbpath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d '[:blank:]'` +PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d '[:blank:]'` + mongod=${MONGOD-/usr/bin/mongod} MONGO_USER=mongod |