In RHEL 6, when setting up a YAML configuration file, if you enter the expected string value for pidFilePath, as described in the docs(http://docs.mongodb.org/manual/reference/configuration-options/#processManagement.pidFilePath), mongo won't start.
the awk parsing or the subsequent 'dirname' call will cause the $PIDDIR variable to have a trailing tick
The following:
PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]](processManagement\.)?pidfilepath[[:blank:]][:=][[:blank:]]*/
' "$CONFIGFILE" | tr -d '[:blank:]'`
results in
$PIDFILEPATH being "/dir/to/pid.file"
PIDDIR=`dirname $PIDFILEPATH`
results in
$PIDDIR being "dir/to
which obviously causes the /etc/init.d/mongod to crash and avoids mongo to start
- duplicates
-
SERVER-17337 RPM Init script breaks with quotes in yaml config file
- Closed
- is duplicated by
-
SERVER-17546 RHEL init.d script does not handle pidFilePath with quotes
- Closed