summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-01-14 01:53:51 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-01-14 01:53:51 +0000
commit862fef16b14487a6fbdfa09408e05f8f1a31b6db (patch)
tree1bbd50734d5015a27a35a7fcaa19ffc361b0c659 /sys-cluster/drbd/files
parentcorrect md5sum. (diff)
downloadgentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.tar.gz
gentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.tar.bz2
gentoo-2-862fef16b14487a6fbdfa09408e05f8f1a31b6db.zip
new version 0.7.7, improved and cleaned ebuild. Fixes #67505, #65407.
Diffstat (limited to 'sys-cluster/drbd/files')
-rw-r--r--sys-cluster/drbd/files/digest-drbd-0.7.71
-rwxr-xr-xsys-cluster/drbd/files/drbd-0.7-init68
-rw-r--r--sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch21
3 files changed, 90 insertions, 0 deletions
diff --git a/sys-cluster/drbd/files/digest-drbd-0.7.7 b/sys-cluster/drbd/files/digest-drbd-0.7.7
new file mode 100644
index 000000000000..59431bbe122a
--- /dev/null
+++ b/sys-cluster/drbd/files/digest-drbd-0.7.7
@@ -0,0 +1 @@
+MD5 b5e171fd1ecccfe8ebfac4f028314aac drbd-0.7.7.tar.gz 275496
diff --git a/sys-cluster/drbd/files/drbd-0.7-init b/sys-cluster/drbd/files/drbd-0.7-init
new file mode 100755
index 000000000000..e1f178a18b8f
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-0.7-init
@@ -0,0 +1,68 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+#
+# kindly provided by Ron O'Hara, see
+# http://thread.gmane.org/gmane.comp.linux.drbd/6429
+#
+# modified by Christian Zoffoli <xmerlin@gentoo.org>
+#
+
+opts="${opts} reload"
+
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="modprobe"
+RMMOD="rmmod"
+
+depend() {
+ use logger
+ before heartbeat
+ after sshd
+ need net
+}
+
+start() {
+ ebegin "Starting DRBD"
+
+ if [ ! -f $PROC_DRBD ]; then
+ modprobe drbd &> /dev/null
+ fi
+
+ ${DRBDADM} up all
+ eend $ret
+}
+
+stop() {
+ ebegin "Stopping DRBD"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -f $PROC_DRBD ]; then
+ ${DRBDADM} down all
+ fi
+ eend $?
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!!!"
+ eend 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+ ebegin "Status of DRBD"
+ if [ -e $PROC_DRBD ]; then
+ echo "drbd driver OK; device status:"
+ cat "$PROC_DRBD"
+ eend 0
+ else
+ echo >&2 "drbd not loaded"
+ eend 3
+ fi
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ eend $?
+}
diff --git a/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch b/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch
new file mode 100644
index 000000000000..ebb5a6695376
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-0.7.7-module-Makefile.patch
@@ -0,0 +1,21 @@
+--- drbd-0.7.6/drbd/Makefile.chris 2004-12-15 06:26:37.977601576 +0100
++++ drbd-0.7.6/drbd/Makefile 2004-12-15 06:27:02.997797928 +0100
+@@ -154,12 +154,12 @@
+ # install -d $(PREFIX)/var/lib/drbd
+ install -d $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ install -m 644 $(MODOBJ) $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+- ifeq ($(shell uname -r),$(KERNELRELEASE))
+- /sbin/depmod -a || /sbin/depmod -e $(MODOBJ) 2>&1 >/dev/null || true
+- else
+- [ -e $(LINUX)/System.map ] && \
+- /sbin/depmod -F $(LINUX)/System.map -e ./$(MODOBJ) 2>&1 >/dev/null || true
+- endif
++# ifeq ($(shell uname -r),$(KERNELRELEASE))
++# /sbin/depmod -a || /sbin/depmod -e $(MODOBJ) 2>&1 >/dev/null || true
++# else
++# [ -e $(LINUX)/System.map ] && \
++# /sbin/depmod -F $(LINUX)/System.map -e ./$(MODOBJ) 2>&1 >/dev/null || true
++# endif
+ else
+ install:
+ @echo "No .kernelrelease found. Do you need to 'make' the module first?"