The stop() function in drbd-0.7.rc and drbd-8.0.rc assume that drbd was built as a module and so issues an unqualified ${RMMOD} drbd. This fails if drbd was build in the kernel and not as a module. This is easily fixed with the following check (for drbd-0.8.rc) --- drbd-8.0.rc.orig 2010-07-29 01:12:28.424921274 +0000 +++ drbd-8.0.rc 2010-07-29 01:13:19.936773296 +0000 @@ -118,7 +118,9 @@ if [ -e ${PROC_DRBD} ]; then ${DRBDADM} down all sleep 3 - ${RMMOD} drbd + if grep -q '^drbd' /proc/modules ; then + ${RMMOD} drbd + fi fi ret=$? eend $ret
+ 02 Aug 2010; Kacper Kowalik <xarthisius@gentoo.org> files/drbd-0.7.rc, + files/drbd-8.0.rc: + Check if drbd was built as a module before removing it. Fixes bug 330295. + Thanks to Anthony Basile <blueness@gentoo.org> for the patch +