Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56659 - drbd does not install a start stop script in /etc/init.d/
Summary: drbd does not install a start stop script in /etc/init.d/
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-11 00:18 UTC by Jeffrey Crawford
Modified: 2010-09-10 18:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Crawford 2004-07-11 00:18:32 UTC
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 Michael Imhof (RETIRED) gentoo-dev 2004-08-30 06:52:20 UTC
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 Jeffrey Crawford 2004-08-31 08:22:47 UTC
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 Jeffrey Crawford 2004-10-06 16:29:32 UTC
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 Christian Zoffoli (RETIRED) gentoo-dev 2005-01-19 10:42:43 UTC
the ebuild is already fixed in portage