summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Zoffoli <xmerlin@gentoo.org>2005-03-25 15:56:05 +0000
committerChristian Zoffoli <xmerlin@gentoo.org>2005-03-25 15:56:05 +0000
commit2e9c9319984e3bb208803f1329df7ea0f00c250d (patch)
tree6183fa3581b2da98e87321fc265c6e6fc1246439 /sys-fs/gfs
parentadded pgadmin3-1.2.0 mask (diff)
downloadhistorical-2e9c9319984e3bb208803f1329df7ea0f00c250d.tar.gz
historical-2e9c9319984e3bb208803f1329df7ea0f00c250d.tar.bz2
historical-2e9c9319984e3bb208803f1329df7ea0f00c250d.zip
added dynamic need in init script
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-fs/gfs')
-rw-r--r--sys-fs/gfs/ChangeLog6
-rw-r--r--sys-fs/gfs/Manifest12
-rwxr-xr-xsys-fs/gfs/files/gfs.rc42
-rw-r--r--sys-fs/gfs/gfs-6.1_pre21.ebuild16
4 files changed, 38 insertions, 38 deletions
diff --git a/sys-fs/gfs/ChangeLog b/sys-fs/gfs/ChangeLog
index 70cc1ccf11bd..8b8249227a8b 100644
--- a/sys-fs/gfs/ChangeLog
+++ b/sys-fs/gfs/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/gfs
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/ChangeLog,v 1.7 2005/03/25 02:19:14 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/ChangeLog,v 1.8 2005/03/25 15:56:05 xmerlin Exp $
+
+ 25 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/gfs.rc,
+ gfs-6.1_pre21.ebuild:
+ added dynamic need in init script
25 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/gfs.rc:
improved init script
diff --git a/sys-fs/gfs/Manifest b/sys-fs/gfs/Manifest
index 5fc919235d24..4f5079124580 100644
--- a/sys-fs/gfs/Manifest
+++ b/sys-fs/gfs/Manifest
@@ -1,15 +1,15 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 7933e2ddeecadeb5716d65efb2817180 ChangeLog 1220
-MD5 816e1b389a361d9c9f0e2f405a3d2876 gfs-6.1_pre21.ebuild 1602
+MD5 8557fd65e006a636e5a8904b32c8a912 ChangeLog 1349
+MD5 e532bae4d160bb24ffb1b896b8d2f15e gfs-6.1_pre21.ebuild 1083
MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223
MD5 8b61a396206c23d7fb8e1adad649f8b7 files/digest-gfs-6.1_pre21 65
-MD5 a56e0428f812cc0b9a1967358124706e files/gfs.rc 4260
+MD5 8c5b6b5456cc2177a4030cfcfc933eac files/gfs.rc 4389
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFCQ3U6gMUyd/cdjWsRAnT7AKCNGMR1F/uHqPPSzh8+SjMJOnsRXQCZAf9Q
-j0F+1zH9tqnF83y3JgVebCw=
-=bqzz
+iD8DBQFCRDZxgMUyd/cdjWsRAta7AJ9RDvtbh86g7Wkdp5GkDGL9wrZ25gCeLVK+
+FSR7OrgSIX3rPK0sdQMYskQ=
+=bC2Y
-----END PGP SIGNATURE-----
diff --git a/sys-fs/gfs/files/gfs.rc b/sys-fs/gfs/files/gfs.rc
index 07130d2b3531..d1045193ee5f 100755
--- a/sys-fs/gfs/files/gfs.rc
+++ b/sys-fs/gfs/files/gfs.rc
@@ -1,21 +1,35 @@
#!/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.rc,v 1.4 2005/03/25 02:19:14 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/files/gfs.rc,v 1.5 2005/03/25 15:56:05 xmerlin Exp $
opts="${opts} mountall"
depend() {
- use dns logger
- use net
- after gnbd-client clvmd
- need cluster-manager cluster-locking-manager fenced
+ local myneed="cluster-manager cluster-locking-manager fenced"
+ local devices="$(awk '!/^#/ && $3 == "gfs" && $4 !~ /noauto/ {print $1 }' /etc/fstab)"
+
+ if [ -n "${devices}" ]; then
+ local device=""
+ for device in ${devices}; do
+ if [ -n "$(echo "${device}" | awk '$1 ~ /\/dev\/gnbd')" ]; then
+ myneed="${myneed} gnbd-client"
+ else
+ if [ -n "$(echo "${device}" | awk '$1 ~ /\/dev\/vg')" ]; then
+ myneed="${myneed} clvmd"
+ fi
+ fi
+ done
+ fi
+
+ use dns logger net
+ need ${myneed}
provide cluster
}
mount_gfs_filesystems() {
local remaining=""
- remaining="$(awk '!/^#/ && $3 ~ /gfs/ { if ($4 !~ "noauto") print $1 }' /etc/fstab)"
+ remaining="$(awk '!/^#/ && $3 == "gfs" { if ($4 !~ "noauto") print $1 }' /etc/fstab)"
if [ -n "${remaining}" ]; then
@@ -26,13 +40,7 @@ mount_gfs_filesystems() {
if [ -b ${device} ]; then
remaining_verified="${remaining_verified} ${device}"
else
- if [ $(echo "${device}" | awk '$1 ~ /\/dev\/gnbd/') ]; then
- ewarn "Please start /etc/init.d/gnbd-client before trying to mount GNBDs devices"
- else
- if [ $(echo "${device}" | awk '$1 ~ /\/dev\/vg/') ]; then
- ewarn "Please start /etc/init.d/clvmd before trying to mount LVM volumes"
- fi
- fi
+ ewarn "Block device ${device} not found!!"
fi
done
@@ -40,8 +48,8 @@ mount_gfs_filesystems() {
einfo "Mounting GFS filesystems"
device=""
for device in ${remaining_verified}; do
- local target="$(awk '!/^#/ && $3 ~ /gfs/ { if ("$1" -eq "${device}" ) print $2 }' /etc/fstab)"
- local mounted="$(awk '$3 ~ /gfs/ { if ("$1" -eq "${device}" ) print $2 }' /proc/mounts)"
+ local target="$(awk '!/^#/ && $3 == "gfs" { if ("$1" -eq "${device}" ) print $2 }' /etc/fstab)"
+ local mounted="$(awk '$3 == "gfs" { if ("$1" -eq "${device}" ) print $2 }' /proc/mounts)"
# mount only filesystems not already mounted
if [ -z "${mounted}" ]; then
@@ -62,7 +70,7 @@ mount_gfs_filesystems() {
umount_gfs_filesystems() {
local sig retry
- local remaining="$(awk '$3 ~ /gfs/ { print $2 }' /proc/mounts | sort -r)"
+ local remaining="$(awk '$3 == "gfs" { print $2 }' /proc/mounts | sort -r)"
if [ -n "${remaining}" ]
then
@@ -80,7 +88,7 @@ umount_gfs_filesystems() {
umount ${remaining} &>/dev/null
eend $? "Failed to unmount GFS filesystems"
fi
- remaining="$(awk '$3 ~ /gfs/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ remaining="$(awk '$3 == "gfs" { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
[ -z "${remaining}" ] && break
/bin/fuser -k -m ${sig} ${remaining} &>/dev/null
sleep 5
diff --git a/sys-fs/gfs/gfs-6.1_pre21.ebuild b/sys-fs/gfs/gfs-6.1_pre21.ebuild
index 032ff564a194..2a3996c8d813 100644
--- a/sys-fs/gfs/gfs-6.1_pre21.ebuild
+++ b/sys-fs/gfs/gfs-6.1_pre21.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-6.1_pre21.ebuild,v 1.3 2005/03/22 13:59:10 xmerlin Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/gfs/gfs-6.1_pre21.ebuild,v 1.4 2005/03/25 15:56:05 xmerlin Exp $
inherit linux-mod
@@ -46,18 +46,6 @@ src_compile() {
src_install() {
make DESTDIR=${D} install || die
- exeinto /etc/init.d ; newexe ${FILESDIR}/gfs.rc gfs || die
+ newinitd ${FILESDIR}/${PN}.rc ${PN} || die
}
-pkg_postinst() {
- einfo "This package is a container package for all the GFS related utils/libs."
- einfo "For more info see the following URLs:"
- einfo "http://sources.redhat.com/cluster/doc/usage.txt"
- einfo ""
- einfo "Run the following commands on cluster nodes to get everything going:"
- einfo "hint: you need to actually set things up before you do this, see the first URL above"
- einfo "# ccsd"
- einfo "# cman_tool join"
- einfo "# fence_tool join"
- einfo "# mount -t gfs /dev/sdd1 /mnt/gfs ...."
-}