summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-08-02 04:42:37 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-08-02 04:42:37 +0000
commitc2c4af2f1ca837f83937650f6b5950912087bc2b (patch)
tree2f57ba70b5db2a32f83d57580189a9c879a8e67a /sys-cluster
parentVersion bump (it installs documentation by itself now, needs /var/db/sudo); d... (diff)
downloadgentoo-2-c2c4af2f1ca837f83937650f6b5950912087bc2b.tar.gz
gentoo-2-c2c4af2f1ca837f83937650f6b5950912087bc2b.tar.bz2
gentoo-2-c2c4af2f1ca837f83937650f6b5950912087bc2b.zip
Check if drbd was built as a module before removing it. Fixes bug 330295. Thanks to Anthony Basile <blueness@gentoo.org> for the patch
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/drbd/ChangeLog7
-rwxr-xr-xsys-cluster/drbd/files/drbd-0.7.rc6
-rw-r--r--sys-cluster/drbd/files/drbd-8.0.rc6
3 files changed, 14 insertions, 5 deletions
diff --git a/sys-cluster/drbd/ChangeLog b/sys-cluster/drbd/ChangeLog
index 46c674e84667..ba082c5eafca 100644
--- a/sys-cluster/drbd/ChangeLog
+++ b/sys-cluster/drbd/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-cluster/drbd
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.99 2010/06/26 16:44:03 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.100 2010/08/02 04:42:37 xarthisius Exp $
+
+ 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
*drbd-8.3.8 (26 Jun 2010)
diff --git a/sys-cluster/drbd/files/drbd-0.7.rc b/sys-cluster/drbd/files/drbd-0.7.rc
index d73c8aa39dd3..f5125f5b5074 100755
--- a/sys-cluster/drbd/files/drbd-0.7.rc
+++ b/sys-cluster/drbd/files/drbd-0.7.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/files/drbd-0.7.rc,v 1.2 2007/10/05 20:55:59 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/files/drbd-0.7.rc,v 1.3 2010/08/02 04:42:36 xarthisius Exp $
opts="${opts} reload"
@@ -50,7 +50,9 @@ stop() {
if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
if [ -f ${PROC_DRBD} ]; then
${DRBDADM} down all
- ${RMMOD} drbd
+ if grep -q '^drbd' /proc/modules ; then
+ ${RMMOD} drbd
+ fi
fi
eend $?
else
diff --git a/sys-cluster/drbd/files/drbd-8.0.rc b/sys-cluster/drbd/files/drbd-8.0.rc
index 4d4c0045105d..5da2dda326bf 100644
--- a/sys-cluster/drbd/files/drbd-8.0.rc
+++ b/sys-cluster/drbd/files/drbd-8.0.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/files/drbd-8.0.rc,v 1.5 2007/11/12 00:18:35 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/files/drbd-8.0.rc,v 1.6 2010/08/02 04:42:36 xarthisius Exp $
opts="${opts} reload"
@@ -118,7 +118,9 @@ stop() {
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