Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27087

Escape nested quotes in rpm init script

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc5, 3.5.1
    • Affects Version/s: None
    • Component/s: Packaging
    • None
    • Fully Compatible
    • ALL
    • Build 2016-11-21

      Nested quotes are not properly escaped here https://github.com/mongodb/mongo/blob/master/rpm/init.d-mongod#L41, causing PIDFILEPATH and PIDDIR to not get set.

      sudo service mongod status
      /etc/init.d/mongod: command substitution: line 41: unexpected EOF while looking for matching `''
      /etc/init.d/mongod: command substitution: line 42: syntax error: unexpected end of file
      dirname: missing operand
      Try 'dirname --help' for more information.
      mongod is stopped
      

            Assignee:
            brian.samek@mongodb.com Brian Samek
            Reporter:
            brian.samek@mongodb.com Brian Samek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: