[SERVER-582] have init script respect buildtime --prefix Created: 28/Jan/10  Updated: 28/May/10  Resolved: 05/May/10

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: josh rabinowitz Assignee: Richard Kreuter (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

redhat based distros


Participants:

 Description   

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 –



 Comments   
Comment by Richard Kreuter (Inactive) [ 05/May/10 ]

The init scripts around are really only meant for the respective operating systems' package managers; the SConstruct file never installs them. So I think it's best if the build tool never touched these init scripts.

Generated at Thu Feb 08 02:54:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.