summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2007-05-07 15:48:57 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2007-05-07 15:48:57 +0000
commit0ceca9394e9a3f8026d05970e435159eb656d20a (patch)
treea1996df252b62472ea39c8be166137acc3a64689 /sys-cluster/drbd
parentFixing ChangeLog for net-libs/libupnp (diff)
downloadhistorical-0ceca9394e9a3f8026d05970e435159eb656d20a.tar.gz
historical-0ceca9394e9a3f8026d05970e435159eb656d20a.tar.bz2
historical-0ceca9394e9a3f8026d05970e435159eb656d20a.zip
Added new init script.
Package-Manager: portage-2.1.2.2
Diffstat (limited to 'sys-cluster/drbd')
-rw-r--r--sys-cluster/drbd/ChangeLog8
-rw-r--r--sys-cluster/drbd/Manifest32
-rw-r--r--sys-cluster/drbd/drbd-8.0.2-r1.ebuild (renamed from sys-cluster/drbd/drbd-8.0.2.ebuild)4
-rw-r--r--sys-cluster/drbd/files/digest-drbd-8.0.2-r1 (renamed from sys-cluster/drbd/files/digest-drbd-8.0.2)0
-rw-r--r--sys-cluster/drbd/files/drbd-8.0.rc150
5 files changed, 177 insertions, 17 deletions
diff --git a/sys-cluster/drbd/ChangeLog b/sys-cluster/drbd/ChangeLog
index 11e551df6103..1e6ca3dca3d8 100644
--- a/sys-cluster/drbd/ChangeLog
+++ b/sys-cluster/drbd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-cluster/drbd
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.63 2007/05/05 19:55:16 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/ChangeLog,v 1.64 2007/05/07 15:48:57 xmerlin Exp $
+
+*drbd-8.0.2-r1 (07 May 2007)
+
+ 07 May 2007; Christian Zoffoli <xmerlin@gentoo.org> +files/drbd-8.0.rc,
+ -drbd-8.0.2.ebuild, +drbd-8.0.2-r1.ebuild:
+ Added new init script.
05 May 2007; Christian Zoffoli <xmerlin@gentoo.org> -drbd-0.7.22.ebuild,
-drbd-0.7.22-r1.ebuild, drbd-0.7.23.ebuild:
diff --git a/sys-cluster/drbd/Manifest b/sys-cluster/drbd/Manifest
index e2436ac99269..f2bf045ed899 100644
--- a/sys-cluster/drbd/Manifest
+++ b/sys-cluster/drbd/Manifest
@@ -21,20 +21,24 @@ AUX drbd-8.0.0-scripts.adjust_drbd_config_h.sh.patch 679 RMD160 f459b054e5a0ee43
MD5 1a750b5925a82b04ae4624f0e3a64820 files/drbd-8.0.0-scripts.adjust_drbd_config_h.sh.patch 679
RMD160 f459b054e5a0ee43bac860a365ce42d19b35f70f files/drbd-8.0.0-scripts.adjust_drbd_config_h.sh.patch 679
SHA256 594527b03820de4f8fbfbdfdbfeb004242e8a712575fb2854f0f6b99880d9b36 files/drbd-8.0.0-scripts.adjust_drbd_config_h.sh.patch 679
+AUX drbd-8.0.rc 2971 RMD160 89831092e5abb2b7063ac25b89cc1af9b63ef8cd SHA1 b9e5d83e9b22b645ca8b96e97945fdaac0c74a80 SHA256 d670789501894a7236e9996b947a6850f3dbd575c17f123765185d6e70f41246
+MD5 261e363d4b8a351aec2c84b5be73ff4a files/drbd-8.0.rc 2971
+RMD160 89831092e5abb2b7063ac25b89cc1af9b63ef8cd files/drbd-8.0.rc 2971
+SHA256 d670789501894a7236e9996b947a6850f3dbd575c17f123765185d6e70f41246 files/drbd-8.0.rc 2971
DIST drbd-0.7.23.tar.gz 296960 RMD160 140b0ea1cdcce54a42084dc376b21872f6f5679d SHA1 f52f086381ce6fd7ac73954d9879ecb9c0992b63 SHA256 6aab0b7beb859071bd85571b1a018ffb9e7261084c6fafa78b694dbc0b1303f5
DIST drbd-8.0.2.tar.gz 491520 RMD160 3860ec36d228f9d93c006fa574cc488272664220 SHA1 33df7f7727fccffd82fb74b4b581fac3a8d73f4b SHA256 f35bcee5672ef678d8e93e845ef0b1de265f0ff183d4d23f821031248a7479e1
EBUILD drbd-0.7.23.ebuild 2157 RMD160 b33c9c319dd0eefe224dad46faefe1a31c10761d SHA1 f2f1e0595df461d4f0130083fde0863e0746a02f SHA256 bc7ffaf2e74423a328e783cc040fe4c5766713e8c7b6db05839b276a8071de51
MD5 da7657531c0446cbd5c5023f5ff446b5 drbd-0.7.23.ebuild 2157
RMD160 b33c9c319dd0eefe224dad46faefe1a31c10761d drbd-0.7.23.ebuild 2157
SHA256 bc7ffaf2e74423a328e783cc040fe4c5766713e8c7b6db05839b276a8071de51 drbd-0.7.23.ebuild 2157
-EBUILD drbd-8.0.2.ebuild 2163 RMD160 f4fd04f64de10dba380ff84489e99ff42f1564b9 SHA1 f14354cbbdbfa5d7803619d0e56f072d6a4e85db SHA256 ad2240ed67621ca8d9136360fb9211d2b340b164851043e5f718472bb2f6fd76
-MD5 c0716a324047168d9bc7bb9de1621503 drbd-8.0.2.ebuild 2163
-RMD160 f4fd04f64de10dba380ff84489e99ff42f1564b9 drbd-8.0.2.ebuild 2163
-SHA256 ad2240ed67621ca8d9136360fb9211d2b340b164851043e5f718472bb2f6fd76 drbd-8.0.2.ebuild 2163
-MISC ChangeLog 10750 RMD160 cb12e21d6deee150f3fda9eb6dd12ed253edd228 SHA1 fd0d1ef566a02a421ded1853b88b55a221b55b25 SHA256 f21cbc0c9a7e2af4192354d7eba3dad5f70fd56dadd78250cc3ee9151918c988
-MD5 8927a3da7fc419a89c99b7f0a86bae76 ChangeLog 10750
-RMD160 cb12e21d6deee150f3fda9eb6dd12ed253edd228 ChangeLog 10750
-SHA256 f21cbc0c9a7e2af4192354d7eba3dad5f70fd56dadd78250cc3ee9151918c988 ChangeLog 10750
+EBUILD drbd-8.0.2-r1.ebuild 2166 RMD160 7a992d3342b15a6e4de531f0ad8357ddffc9f0be SHA1 9ca27648b89438b75a9cc6b0e4c6853ceaeeee99 SHA256 61583bb079fbad1a1511b6a2347c1fe19725882fef2381b8677ba685302bc722
+MD5 1fa8f789326b9d9726357b18068b5a8a drbd-8.0.2-r1.ebuild 2166
+RMD160 7a992d3342b15a6e4de531f0ad8357ddffc9f0be drbd-8.0.2-r1.ebuild 2166
+SHA256 61583bb079fbad1a1511b6a2347c1fe19725882fef2381b8677ba685302bc722 drbd-8.0.2-r1.ebuild 2166
+MISC ChangeLog 10925 RMD160 89ad7f9696cd92ada90e0321eccdc9ec434e76b1 SHA1 eb7f4b7846d9302799c31f68ca5a883f0bd704eb SHA256 bdedd081cd11d53564b1a0aa75ac741a57a688cb65b974c0cca55bac7c0ca61a
+MD5 ffdee17b69d19ac4f806258e00d6d0dc ChangeLog 10925
+RMD160 89ad7f9696cd92ada90e0321eccdc9ec434e76b1 ChangeLog 10925
+SHA256 bdedd081cd11d53564b1a0aa75ac741a57a688cb65b974c0cca55bac7c0ca61a ChangeLog 10925
MISC metadata.xml 229 RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e SHA1 e6315be43241c55bdc0d12a42fa05632c5ff9b79 SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f
MD5 58f295ba7477091e41340647670f3231 metadata.xml 229
RMD160 4dcf17b88c5f4db2e817f473f3e8269b0bff2e6e metadata.xml 229
@@ -42,13 +46,13 @@ SHA256 49e13d2d49bef7298e3bb665ebeceeff9b0880fae5ff639cb8405993504f244f metadata
MD5 31f98d1b2c690014a7f2a2ec87f52c86 files/digest-drbd-0.7.23 235
RMD160 d5f5caa79a7f14a50501273ecc99a7b1759122d6 files/digest-drbd-0.7.23 235
SHA256 0339e7534391d2d45f52de0bb6e4d2ae666dd55225033f0f839d558267736931 files/digest-drbd-0.7.23 235
-MD5 670edbba33863d874f4b9018223fac6a files/digest-drbd-8.0.2 232
-RMD160 6b34027a3085650dbc833925ae3b8ae2fb3478f7 files/digest-drbd-8.0.2 232
-SHA256 1ae966f26c2aac98db79660980aa05e7a58dbc81c011b67ba8656aacf67a989b files/digest-drbd-8.0.2 232
+MD5 670edbba33863d874f4b9018223fac6a files/digest-drbd-8.0.2-r1 232
+RMD160 6b34027a3085650dbc833925ae3b8ae2fb3478f7 files/digest-drbd-8.0.2-r1 232
+SHA256 1ae966f26c2aac98db79660980aa05e7a58dbc81c011b67ba8656aacf67a989b files/digest-drbd-8.0.2-r1 232
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-iD8DBQFGPOEtgMUyd/cdjWsRAnHRAJ9GldpO9Ji++0JIjyVuxwN2Hk8kigCeL+B2
-TuOAqpq48fVyWzl09a6yFLA=
-=EXfB
+iD8DBQFGP0pygMUyd/cdjWsRAixXAKCJMoFa2OHIEdKQcpvu2MdrzGd5NgCcDQKx
+o2tFmSL+cKArGlwokyEvkjY=
+=SFOX
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/drbd/drbd-8.0.2.ebuild b/sys-cluster/drbd/drbd-8.0.2-r1.ebuild
index 31bf4989bcb8..91fc0c922e38 100644
--- a/sys-cluster/drbd/drbd-8.0.2.ebuild
+++ b/sys-cluster/drbd/drbd-8.0.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/drbd-8.0.2.ebuild,v 1.1 2007/05/05 19:49:54 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/drbd/drbd-8.0.2-r1.ebuild,v 1.1 2007/05/07 15:48:57 xmerlin Exp $
inherit eutils versionator linux-mod linux-info
@@ -53,7 +53,7 @@ src_install() {
emake PREFIX=${D} install || die "install problem"
# gentoo-ish init-script
- newinitd ${FILESDIR}/${PN}-0.7.rc ${PN} || die
+ newinitd ${FILESDIR}/${PN}-8.0.rc ${PN} || die
# needed by drbd startup script
#keepdir /var/lib/drbd
diff --git a/sys-cluster/drbd/files/digest-drbd-8.0.2 b/sys-cluster/drbd/files/digest-drbd-8.0.2-r1
index faf6a0c44d81..faf6a0c44d81 100644
--- a/sys-cluster/drbd/files/digest-drbd-8.0.2
+++ b/sys-cluster/drbd/files/digest-drbd-8.0.2-r1
diff --git a/sys-cluster/drbd/files/drbd-8.0.rc b/sys-cluster/drbd/files/drbd-8.0.rc
new file mode 100644
index 000000000000..87e1968ec42c
--- /dev/null
+++ b/sys-cluster/drbd/files/drbd-8.0.rc
@@ -0,0 +1,150 @@
+#!/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.1 2007/05/07 15:48:57 xmerlin Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use logger
+ need net
+ before heartbeat
+ after sshd
+}
+
+DEFAULTFILE="/etc/conf.d/drbd"
+DRBDADM="/sbin/drbdadm"
+PROC_DRBD="/proc/drbd"
+MODPROBE="/sbin/modprobe"
+RMMOD="/sbin/rmmod"
+UDEV_TIMEOUT=10
+ADD_MOD_PARAM=""
+
+if [ -f $DEFAULTFILE ]; then
+ . $DEFAULTFILE
+fi
+
+# Just in case drbdadm want to display any errors in the configuration
+# file, or we need to ask the user about registering this installation
+# at http://usage.drbd.org, we call drbdadm here without any IO
+# redirection.
+$DRBDADM sh-nop
+
+function assure_module_is_loaded
+{
+ [ -e "$PROC_DRBD" ] && return
+ ebegin "Loading drbd module"
+ ret=0
+
+ $MODPROBE -s drbd `$DRBDADM sh-mod-parms` $ADD_MOD_PARAM || ret=20
+ eend $ret
+ return $ret
+}
+
+function adjust_with_progress
+{
+ IFS_O=$IFS
+ NEWLINE='
+'
+ IFS=$NEWLINE
+ local D=0
+ local S=0
+ local N=0
+
+ einfon "Setting drbd parameters "
+ COMMANDS=`$DRBDADM -d adjust all` || {
+ eend 20 "Error executing drbdadm"
+ return 20
+ }
+ echo -n "[ "
+
+ for CMD in $COMMANDS; do
+ if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
+ elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
+ elif echo $CMD | grep -q net; then echo -n "n$N "; N=$(( N+1 ));
+ else echo echo -n ".. ";
+ fi
+ IFS=$IFS_O
+ $CMD || {
+ echo
+ eend 20 "cmd $CMD failed!"
+ return 20
+ }
+ IFS=$NEWLINE
+ done
+ echo "]"
+ eend 0
+
+ IFS=$IFS_O
+}
+
+start() {
+ einfo "Starting DRBD resources:"
+ eindent
+ assure_module_is_loaded || return $?
+ adjust_with_progress || return $?
+
+ # make sure udev has time to create the device files
+ ebegin "Waiting for udev device creation ..."
+ for RESOURCE in `$DRBDADM sh-resources`; do
+ for DEVICE in `$DRBDADM sh-dev $RESOURCE`; do
+ UDEV_TIMEOUT_LOCAL=$UDEV_TIMEOUT
+ while [ ! -e $DEVICE ] && [ $UDEV_TIMEOUT_LOCAL -gt 0 ] ; do
+ sleep 1
+ UDEV_TIMEOUT_LOCAL=$(( $UDEV_TIMEOUT_LOCAL-1 ))
+ done
+ done
+ done
+ eend 0
+
+ einfon "Waiting for connection "
+ $DRBDADM wait-con-int
+ echo
+ ret=$?
+ eend $ret
+ return $ret
+}
+
+stop() {
+ ebegin "Stopping all DRBD resources"
+
+ # Check for mounted drbd devices
+ if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
+ if [ -e ${PROC_DRBD} ]; then
+ ${DRBDADM} down all
+ ${RMMOD} drbd
+ fi
+ ret=$?
+ eend $ret
+ return $ret
+ else
+ einfo "drbd devices mounted, please umount them before trying to stop drbd!"
+ eend 1
+ return 1
+ fi
+}
+
+status() {
+ # NEEDS to be heartbeat friendly...
+ # so: put some "OK" in the output.
+
+ if [ -e $PROC_DRBD ]; then
+ ret=0
+ ebegin "drbd driver loaded OK; device status:"
+ eend $ret
+ cat $PROC_DRBD
+ else
+ ebegin "drbd not loaded"
+ ret=3
+ eend $ret
+ fi
+ return $ret
+}
+
+reload() {
+ ebegin "Reloading DRBD"
+ ${DRBDADM} adjust all
+ ret=$?
+ eend $ret
+ return $ret
+}