diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-19 17:32:19 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-03-19 17:32:19 +0000 |
commit | a177b260574144c46e0a2a96e319899ac9cca622 (patch) | |
tree | f5cc8eb818997cfc4f63d2e08ac1f0bb58b02c1f /sys-fs/gfs/files | |
parent | Added ~sparc keyword wrt bug #84791. (diff) | |
download | gentoo-2-a177b260574144c46e0a2a96e319899ac9cca622.tar.gz gentoo-2-a177b260574144c46e0a2a96e319899ac9cca622.tar.bz2 gentoo-2-a177b260574144c46e0a2a96e319899ac9cca622.zip |
gfs added to portage
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-fs/gfs/files')
-rw-r--r-- | sys-fs/gfs/files/digest-gfs-6.1_pre21 | 1 | ||||
-rwxr-xr-x | sys-fs/gfs/files/gfs | 66 | ||||
-rwxr-xr-x | sys-fs/gfs/files/gfs-mount | 28 |
3 files changed, 95 insertions, 0 deletions
diff --git a/sys-fs/gfs/files/digest-gfs-6.1_pre21 b/sys-fs/gfs/files/digest-gfs-6.1_pre21 new file mode 100644 index 000000000000..5f642cd0ea14 --- /dev/null +++ b/sys-fs/gfs/files/digest-gfs-6.1_pre21 @@ -0,0 +1 @@ +MD5 3e40be9da606f70dab0c190b9cbe54d9 gfs-6.1-pre21.tar.gz 164356 diff --git a/sys-fs/gfs/files/gfs b/sys-fs/gfs/files/gfs new file mode 100755 index 000000000000..243171c26850 --- /dev/null +++ b/sys-fs/gfs/files/gfs @@ -0,0 +1,66 @@ +#!/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-fs/gfs/files/gfs,v 1.1 2005/03/19 17:32:19 xmerlin Exp $ + +depend() { + provide cluster + need net + use dns logger +} + +checkconfig() { + if [ ! -f /etc/ntp.conf ] ; then + eerror "Please create /etc/ntp.conf" + eerror "Sample conf: /usr/share/ntp/ntp.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + + einfo "Starting gfs cluster:" + + ebegin "Loading needed kernel modules" + + if [ ! -f /proc/cluster/lock_dlm ]; then + modprobe lock_dlm + fi + if [ ! -f /proc/fs/gfs ]; then + modprobe gfs + fi + eend $? "Failed to load needed kernel modules" + + ebegin "Starting ccsd" + start-stop-daemon --start --quiet --pidfile /var/run/ccsd.pid \ + --startas /sbin/ccsd + sleep 2 + eend $? "Failed to start ccsd" + + ebegin "Joining the cluster" + /sbin/cman_tool join + eend $? "Failed to join the cluster" + + ebegin "Joining the fence domain (in 120 seconds)" + /sbin/fence_tool join -t 120 + eend $? "Failed to join the fence domain" +} + +stop() { + einfo "Stopping gfs cluster:" + + ebegin "Leaving the fence domain" + /sbin/fence_tool leave + eend $? "Failed to leave the fence domain" + + ebegin "Leaving the cluster" + sleep 2 + /sbin/cman_tool leave + eend $? "Failed to leave the cluster" + + ebegin "Stopping ccsd" + killall -9 ccsd + eend $? "Failed to stop ccsd" +} diff --git a/sys-fs/gfs/files/gfs-mount b/sys-fs/gfs/files/gfs-mount new file mode 100755 index 000000000000..739afd76cc5f --- /dev/null +++ b/sys-fs/gfs/files/gfs-mount @@ -0,0 +1,28 @@ +#!/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-fs/gfs/files/gfs-mount,v 1.1 2005/03/19 17:32:19 xmerlin Exp $ + +depend() { + need net + after gnbd-client gfs + use dns logger +} + +start() { + GFS=`cat /etc/fstab | grep 'gfs'` + if [ -n "$GFS" ] ; then + ebegin "Mounting all gfs filesystems" + cat /etc/fstab | awk '/[\t\s]gfs[\t\s]/ { print $1,$2 }' | xargs mount -v -t gfs + eend $? "Failed to mount all gfs filesystems" + fi +} + +stop() { + GFS=`cat /etc/fstab | grep 'gfs'` + if [ -n "$GFS" ] ; then + ebegin "Unmounting all gfs filesystems" + cat /etc/fstab | awk '/[\t\s]gfs[\t\s]/ { print $2 }' | xargs umount -v -t gfs + eend $? "Failed to umount all gfs filesystems" + fi +} |