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

have init script respect buildtime --prefix

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Environment:
      redhat based distros

      I was doing this during my build process, but gave up because the init script didn't seem to work anyway:

      cd $(MONGODB)/rpm && perl -i.bak -npe 's!/usr/bin/mongod!$(INSTALL)/bin/mongod!' init.d-mongod

      That's from the makefile I had been using to build 1.2.1 (below, which I gave up on for now)

      – BEGIN MAKEFILE –

      MONGODB=mongodb-src-r1.2.1
      INSTALL=/home/services/mongodb-r1.2.1

      make:
      psd mongod && sudo service mongod stop || echo "not already running"
      rm -rf $(MONGODB)
      tar zxf $(MONGODB).tar.gz
      cd $(MONGODB) && sudo scons --prefix=$(INSTALL) all install
      cd $(MONGODB)/rpm && perl -i.bak -npe 's!/usr/bin/mongod!$(INSTALL)/bin/mongod!' init.d-mongod
      cd $(MONGODB)/rpm && perl -i.bak -npe 's!(.mongod .OPTIONS)Unable to render embedded object: File (runuser joshr -c \1) not found.' init.d-mongod
      chmod +x $(MONGODB)/rpm/init.d-mongod
      sudo cp -p $(MONGODB)/rpm/init.d-mongod /etc/rc.d/init.d/mongod
      sudo chkconfig mongod on
      sudo service mongod start

      prereq:
      echo "installing prereqs for centos5"
      yum install scons pcre pcre-devel boost boost-devel js js-devel readline readline-devel

      — END MAKEFILE –

            Assignee:
            richard.kreuter Richard Kreuter (Inactive)
            Reporter:
            joshr josh rabinowitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: