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
Description:   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.

------- Comment #1 From Michael Imhof 2004-08-30 06:52:20 0000 -------
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.

------- Comment #2 From Jeffrey Crawford 2004-08-31 08:22:47 0000 -------
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.

------- Comment #3 From Jeffrey Crawford 2004-10-06 16:29:32 0000 -------
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

------- Comment #4 From Christian Zoffoli 2005-01-19 10:42:43 0000 -------
the ebuild is already fixed in portage