{"action":"created","issue":{"url":"https://api.github.com/repos/mongodb/mongo/issues/1041","labels_url":"https://api.github.com/repos/mongodb/mongo/issues/1041/labels{/name}","comments_url":"https://api.github.com/repos/mongodb/mongo/issues/1041/comments","events_url":"https://api.github.com/repos/mongodb/mongo/issues/1041/events","html_url":"https://github.com/mongodb/mongo/pull/1041","id":114038381,"number":1041,"title":"Fix in configuration file","user":{"login":"pkoro","id":824785,"avatar_url":"https://avatars.githubusercontent.com/u/824785?v=3","gravatar_id":"","url":"https://api.github.com/users/pkoro","html_url":"https://github.com/pkoro","followers_url":"https://api.github.com/users/pkoro/followers","following_url":"https://api.github.com/users/pkoro/following{/other_user}","gists_url":"https://api.github.com/users/pkoro/gists{/gist_id}","starred_url":"https://api.github.com/users/pkoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkoro/subscriptions","organizations_url":"https://api.github.com/users/pkoro/orgs","repos_url":"https://api.github.com/users/pkoro/repos","events_url":"https://api.github.com/users/pkoro/events{/privacy}","received_events_url":"https://api.github.com/users/pkoro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-29T12:24:29Z","updated_at":"2015-10-29T12:44:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo/pulls/1041","html_url":"https://github.com/mongodb/mongo/pull/1041","diff_url":"https://github.com/mongodb/mongo/pull/1041.diff","patch_url":"https://github.com/mongodb/mongo/pull/1041.patch"},"body":"I noticed (CentOS 6) that the init script fails to parse the contents of the configuration file as expected resulting in failure to stop the service when asked. \r\n\r\nThe error steps in from [this][l1] line in the init script:\r\n```\r\nPIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' \"$CONFIGFILE\" | tr -d \"[:blank:]\\\"'\"`\r\n```\r\n\r\nWhat happens is that the `PIDFILEPATH` variable gets populated with all contents following the variable `pidFilePath` in the configuration file with spaces omitted. Hence using the default configuration file the bash variable gets the value:\r\n\r\n```\r\n# echo $PIDFILEPATH\r\n/var/run/mongodb/mongod.pid#locationofpidfile\r\n```\r\n\r\nI guess another way of fixing this is adding something like `..| awk -F# '{print $1}'` within the command but maybe it's better to have a cleaner configuration file. \r\n\r\n[l1]: https://github.com/mongodb/mongo/blob/master/rpm/init.d-mongod#L22"},"comment":{"url":"https://api.github.com/repos/mongodb/mongo/issues/comments/152167330","html_url":"https://github.com/mongodb/mongo/pull/1041#issuecomment-152167330","issue_url":"https://api.github.com/repos/mongodb/mongo/issues/1041","id":152167330,"user":{"login":"ramonfm","id":7131150,"avatar_url":"https://avatars.githubusercontent.com/u/7131150?v=3","gravatar_id":"","url":"https://api.github.com/users/ramonfm","html_url":"https://github.com/ramonfm","followers_url":"https://api.github.com/users/ramonfm/followers","following_url":"https://api.github.com/users/ramonfm/following{/other_user}","gists_url":"https://api.github.com/users/ramonfm/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonfm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonfm/subscriptions","organizations_url":"https://api.github.com/users/ramonfm/orgs","repos_url":"https://api.github.com/users/ramonfm/repos","events_url":"https://api.github.com/users/ramonfm/events{/privacy}","received_events_url":"https://api.github.com/users/ramonfm/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T12:44:04Z","updated_at":"2015-10-29T12:44:04Z","body":"Thanks for tracking this down and taking the time to send in a pull request @pkoro. Before we can consider your changes you'll need to sign the (contributor's agreement)[https://www.mongodb.com/legal/contributor-agreement]."}}