It seems that the status function in the init script returns zero if the module is loaded regardless of the scripts status. According to the Linux Standard Base Core Specification ( http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html ) a zero should be returned when "program is running or service is OK". Our current script will return ok if the module is loaded and the service is stopped. Reproducible: Always Steps to Reproduce: 1. modprobe drbd 2. /etc/init.d/drbd status Actual Results: * status: stopped * drbd driver loaded OK; device status: ... [ ok ] version: 8.0.11 (api:86/proto:86) GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by root@localhost, 2008-04-18 11:35:09 Expected Results: * status: stopped * drbd not loaded ... [ !! ] This really isnt that big of an issue except that it causes problems with heartbeat loading the gentoo version of the init.d script.
this version of DRBD is no longer in portage, and the current stable one is of a different branch (8.3.x). Maybe this BR does no longer apply?
I hope I'minthe right place for the following. I prefer to do not open a new bug since it's really related to this one. If the kernel have support of drbd shipped in but not as a module then init.d/stop warn about: # /etc/init.d/drbd stop * Stopping all DRBD resources ... grep: /proc/modules: No such file or directory So the check should work on /proc/drbd that tell if drbd support exists or not. In add, if there is a mismatch between version of kernel and userland drbd support, you could have warning and drbd kernel version in /proc/drbd too.
InCVS.