diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-23 02:34:44 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-23 02:34:44 +0000 |
commit | 6c58837c31984e50657e7f0cda191a342b66b142 (patch) | |
tree | 95c0c2569a68088bc2633b09ab71ca8050a2edc8 /sys-cluster | |
parent | Package-Manager: portage-2.0.51.19 (diff) | |
download | historical-6c58837c31984e50657e7f0cda191a342b66b142.tar.gz historical-6c58837c31984e50657e7f0cda191a342b66b142.tar.bz2 historical-6c58837c31984e50657e7f0cda191a342b66b142.zip |
new in portage
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-cluster')
-rw-r--r-- | sys-cluster/gnbd/ChangeLog | 11 | ||||
-rw-r--r-- | sys-cluster/gnbd/Manifest | 18 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/digest-gnbd-1.0_pre13 | 1 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-client.rc | 50 | ||||
-rwxr-xr-x | sys-cluster/gnbd/files/gnbd-srv.rc | 81 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbd.devfs | 21 | ||||
-rw-r--r-- | sys-cluster/gnbd/files/gnbdtab | 9 | ||||
-rw-r--r-- | sys-cluster/gnbd/gnbd-1.0_pre13.ebuild | 46 | ||||
-rw-r--r-- | sys-cluster/gnbd/metadata.xml | 8 |
9 files changed, 245 insertions, 0 deletions
diff --git a/sys-cluster/gnbd/ChangeLog b/sys-cluster/gnbd/ChangeLog new file mode 100644 index 000000000000..7b00859b3a7f --- /dev/null +++ b/sys-cluster/gnbd/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sys-cluster/gnbd +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.1 2005/03/23 02:34:44 xmerlin Exp $ + +*gnbd-1.0_pre13 (23 Mar 2005) + + 23 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> +metadata.xml, + +files/gnbd-client.rc, +files/gnbd-srv.rc, +files/gnbd.devfs, +files/gnbdtab, + +gnbd-1.0_pre13.ebuild: + new in portage + diff --git a/sys-cluster/gnbd/Manifest b/sys-cluster/gnbd/Manifest new file mode 100644 index 000000000000..3f012d0f81cf --- /dev/null +++ b/sys-cluster/gnbd/Manifest @@ -0,0 +1,18 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 c7e771c0b7eea2659db6e06f10271214 ChangeLog 430 +MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223 +MD5 c7ba717a3b75ff11e83930fab4188fa3 gnbd-1.0_pre13.ebuild 1042 +MD5 4480c0d828fbe2e7ffc41b0145ae1bbc files/gnbd-client.rc 1269 +MD5 ec5670eaf2caecdf5af8078e453326a8 files/gnbd-srv.rc 1941 +MD5 a96ced2be5dbc837a2d23bd3fbecaa12 files/gnbd.devfs 332 +MD5 79b84f9fc4b7bdee59dd1211663aef8d files/gnbdtab 177 +MD5 59f3ca3db34191305528a95653f41692 files/digest-gnbd-1.0_pre13 65 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.2.6 (GNU/Linux) + +iD8DBQFCQNnWgMUyd/cdjWsRAsbpAJsEq+9+wsevPRjkKeOxV1tLTYPT9QCeOEAz +4htOR9Ck2RgMsZVaOPN5p3k= +=OXqN +-----END PGP SIGNATURE----- diff --git a/sys-cluster/gnbd/files/digest-gnbd-1.0_pre13 b/sys-cluster/gnbd/files/digest-gnbd-1.0_pre13 new file mode 100644 index 000000000000..ff5a77e8a6f8 --- /dev/null +++ b/sys-cluster/gnbd/files/digest-gnbd-1.0_pre13 @@ -0,0 +1 @@ +MD5 e8c4807be08c0af8da09646f2a85f8e0 gnbd-1.0-pre13.tar.gz 57522 diff --git a/sys-cluster/gnbd/files/gnbd-client.rc b/sys-cluster/gnbd/files/gnbd-client.rc new file mode 100755 index 000000000000..95c51fee400c --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-client.rc @@ -0,0 +1,50 @@ +#!/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/gnbd/files/gnbd-client.rc,v 1.1 2005/03/23 02:34:44 xmerlin Exp $ + +depend() { + use dns logger + need net + need fenced +} + +start() { + if [ ! -f /etc/gnbdtab ] ; then + eerror "Please create /etc/gnbdtab" + eerror "Sample conf: /etc/gnbdtab" + return 1 + fi + + ebegin "Loading needed kernel modules for gnbd" + modprobe gnbd + eend $? "Failed to load needed kernel modules for gnbd" + + GNBD=`cat /etc/gnbdtab | egrep '^import'` + if [ -n "$GNBD" ] ; then + ebegin "Importing all GNBDs devices" + einfo "$(awk '/^import/ { print "--> server:", $2 }' /etc/gnbdtab )" + cat /etc/gnbdtab | awk '/^import/ { print "-i", $2 }' | xargs gnbd_import > /dev/null + eend $? "Failed to import gnbd devices" + fi +} + +stop() { + + local GNBD_MONITOR_PROC + + ebegin "Unimporting all GNBDs devices" + gnbd_import -q -R &> /dev/null + eend $? + + GNBD_MONITOR_PROC="$(pgrep gnbd_clusterd)" + if [ -n "${GNBD_MONITOR_PROC}" ]; then + ebegin "Stopping gnbd_monitor" + killall gnbd_monitor &> /dev/null + eend $? + fi + + ebegin "Unloading gnbd kernel module" + modprobe -r gnbd + eend $? "Failed to unload gnbd kernel module" +} diff --git a/sys-cluster/gnbd/files/gnbd-srv.rc b/sys-cluster/gnbd/files/gnbd-srv.rc new file mode 100755 index 000000000000..707624b85956 --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd-srv.rc @@ -0,0 +1,81 @@ +#!/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/gnbd/files/gnbd-srv.rc,v 1.1 2005/03/23 02:34:44 xmerlin Exp $ + +depend() { + use dns logger + need net + need fenced +} + +GNBD_SRV_TIMEOUT=5 + +start() { + local GNBD + + if [ ! -f /etc/gnbdtab ] ; then + eerror "Please create /etc/gnbdtab" + eerror "Sample conf: /etc/gnbdtab" + return 1 + fi + + ebegin "Loading needed kernel modules for gnbd" + modprobe gnbd + eend $? "Failed to load needed kernel modules for gnbd" + + ebegin "Starting gnbd_serv" + start-stop-daemon --start --quiet --exec /sbin/gnbd_serv -- -q + eend $? "Failed to start gnbd_serv" + + GNBD=`cat /etc/gnbdtab | egrep '^export'` + if [ -n "$GNBD" ] ; then + ebegin "Exporting gnbd devices" + einfo "$(awk '/^export/ { print "--> device:", $4, "as", $3 }' /etc/gnbdtab )" + cat /etc/gnbdtab | awk '/^export/ { print "-d", $4, "-e", $3 }' | xargs gnbd_export > /dev/null + eend $? "Failed to export gnbd devices" + fi +} + +stop() { + + local GNBD_SRV_PROCS GNBD_CLUSTERD_PROC + + ebegin "Unexporting all gnbd devices" + gnbd_export -q -R &> /dev/null + eend $? + + if [ "$?" -ne 0 ] + then + ewend 1 "Failed to unexport all gnbd devices" + else + eend 0 + + fi + + ebegin "Stopping gnbd_serv" + + GNBD_SRV_PROCS="$(pgrep gnbd_serv)" + while [ -n "${GNBD_SRV_PROCS}" ] && [ ${GNBD_SRV_TIMEOUT} -gt 0 ] ; do + gnbd_serv -k &> /dev/null + sleep 1 + GNBD_SRV_TIMEOUT=$(( ${GNBD_SRV_TIMEOUT}-1 )) + GNBD_SRV_PROCS="$(pgrep gnbd_serv)" + done + + if [ -n "${GNBD_SRV_PROCS}" ]; then + gnbd_serv -K &> /dev/null + fi + eend $? "Failed to stop gnbd_serv" + + GNBD_CLUSTERD_PROC="$(pgrep gnbd_clusterd)" + if [ -n "${GNBD_CLUSTERD_PROC}" ]; then + ebegin "Stopping gnbd_clusterd" + killall gnbd_clusterd &> /dev/null + eend $? + fi + + ebegin "Unloading gnbd kernel module" + modprobe -r gnbd + eend $? "Failed to unload gnbd kernel module" +} diff --git a/sys-cluster/gnbd/files/gnbd.devfs b/sys-cluster/gnbd/files/gnbd.devfs new file mode 100644 index 000000000000..f501682a9fb5 --- /dev/null +++ b/sys-cluster/gnbd/files/gnbd.devfs @@ -0,0 +1,21 @@ +# +# GNBD +# + +#LOOKUP ^gnbd.* MODLOAD + +# +# gnbd needs crx------- on /dev/gnbd_ctl +# + +REGISTER ^gnbd_ctl PERMISSIONS root.root 600 + +# +# create old style device for /dev/gnbd/.* +# + +#REGISTER ^gnbd/.* MKOLDCOMPAT +#UNREGISTER ^gnbd/.* RMOLDCOMPAT + +#REGISTER ^gnbd.* IGNORE +#REGISTER ^gnbd/.* IGNORE diff --git a/sys-cluster/gnbd/files/gnbdtab b/sys-cluster/gnbd/files/gnbdtab new file mode 100644 index 000000000000..e9a29dc59139 --- /dev/null +++ b/sys-cluster/gnbd/files/gnbdtab @@ -0,0 +1,9 @@ +# +# GNBD filesystem import/export configuration +# + +# type host name device + +# Samples: +# export srv1 export1 /dev/data/export1 +# import srv3 export1 /dev/gnbd/export1 diff --git a/sys-cluster/gnbd/gnbd-1.0_pre13.ebuild b/sys-cluster/gnbd/gnbd-1.0_pre13.ebuild new file mode 100644 index 000000000000..36e2f7bf0376 --- /dev/null +++ b/sys-cluster/gnbd/gnbd-1.0_pre13.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/gnbd-1.0_pre13.ebuild,v 1.1 2005/03/23 02:34:44 xmerlin Exp $ + +MY_PV="${PV/_/-}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="GFS Network Block Devices" +HOMEPAGE="http://sources.redhat.com/cluster/" +#SRC_URI="http://people.redhat.com/cfeist/cluster/tgz/${MY_P}.tar.gz" + +SRC_URI="mirror://gentoo/${MY_P}.tar.gz + http://dev.gentoo.org/~xmerlin/gfs/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + + +DEPEND=">=sys-cluster/magma-1.0_pre8 + >=sys-cluster/gnbd-kernel-2.6.9-r1" + + +S="${WORKDIR}/${MY_P}" + +src_compile() { + ./configure || die + emake || die +} + +src_install() { + make DESTDIR=${D} install || die + + exeinto /etc/init.d + newexe ${FILESDIR}/gnbd-client.rc gnbd-client || die + newexe ${FILESDIR}/gnbd-srv.rc gnbd-srv || die + + insinto /etc + doins ${FILESDIR}/gnbdtab + + if $(has_version sys-fs/devfsd ) ; then + insinto /etc/devfs.d/ + newins ${FILESDIR}/gnbd.devfs gnbd + fi +} diff --git a/sys-cluster/gnbd/metadata.xml b/sys-cluster/gnbd/metadata.xml new file mode 100644 index 000000000000..e2b45fb75fca --- /dev/null +++ b/sys-cluster/gnbd/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cluster</herd> +<maintainer> + <email>cluster@gentoo.org</email> +</maintainer> +</pkgmetadata> |