Bug 56659 - drbd does not install a start stop script in /etc/init.d/
|
Bug#:
56659
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: x86
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: major
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: hp-cluster@gentoo.org
|
Reported By: jeffrey@crawford.homeunix.net
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: drbd does not install a start stop script in /etc/init.d/
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2004-07-11 00:18 0000
|
After installing drbd I was unable to find a scipt that was in the gentoo
format that allowed me to start and stop the driver part of the service.
(datadisk in /etc/ha.d/resource.d/datadisk is present from heartbeat but it
does not load the drvd driver)
Reproducible: Always
Steps to Reproduce:
1. emerge drbd
2. look for /etc/init.d/drbd
3. not find it
Actual Results:
Could not find start stop script
I have written my own start stop script: "/etc/init.d/drbd"
*********************************************************
#!/sbin/runscript
depend() {
need net
before heartbeat
after sshd # In case there are sync problems
}
start() {
ebegin "Starting drbd mirror driver"
${DRBD} ${DRBDDEV} start
if [ "$?" == "1" ]; then # In case you decide this
eend 0 # node is primary the
fi # script returns 1
eend $?
}
stop() {
ebegin "Stopping drbd mirror driver"
${DRBD} ${DRBDDEV} stop
eend $?
}
***********************************************
and "/etc/conf.d/drbd":
***********************************************
DRBD=/drbd # This is an odd place for the script!
DRBDDEV=drbd0
***********************************************
I have set up the script to start after sshd so that I can control the sync
when the servers are waiting for input during boot. This has saved me trips
many times.
I bumped it to -r1 and added your conf.d file and init script. Please have a
look if everything is ok this way and report back.
Thanks in advance.
This works for me..., I do have one additional question, why is the "vendor"
provided start stop script in root "/" and not in /bin:/usr/bin:/sbin etc.
On a new emerge the config file called /etc/conf.d/0.6.12-conf.d was created..
This should be /etc/conf.d/drbd. After renaming it the start script works
correctly
the ebuild is already fixed in portage