summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/gnbd')
-rw-r--r--sys-cluster/gnbd/ChangeLog5
-rw-r--r--sys-cluster/gnbd/Manifest10
-rwxr-xr-xsys-cluster/gnbd/files/gnbd-client.rc35
3 files changed, 43 insertions, 7 deletions
diff --git a/sys-cluster/gnbd/ChangeLog b/sys-cluster/gnbd/ChangeLog
index 7b00859b3a7f..3b090ac51f91 100644
--- a/sys-cluster/gnbd/ChangeLog
+++ b/sys-cluster/gnbd/ChangeLog
@@ -1,6 +1,9 @@
# 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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/ChangeLog,v 1.2 2005/03/23 14:09:48 xmerlin Exp $
+
+ 23 Mar 2005; Christian Zoffoli <xmerlin@gentoo.org> files/gnbd-client.rc:
+ added unmounting gfs capability to gnbd-client script
*gnbd-1.0_pre13 (23 Mar 2005)
diff --git a/sys-cluster/gnbd/Manifest b/sys-cluster/gnbd/Manifest
index 708428a80d28..3b252b2540ac 100644
--- a/sys-cluster/gnbd/Manifest
+++ b/sys-cluster/gnbd/Manifest
@@ -1,10 +1,10 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 c7e771c0b7eea2659db6e06f10271214 ChangeLog 430
+MD5 380d1b7edb041ffb44c08b1be979063d ChangeLog 563
MD5 a64b9a1937a5cfc2fbaf373521f65d47 metadata.xml 223
MD5 c7ba717a3b75ff11e83930fab4188fa3 gnbd-1.0_pre13.ebuild 1042
-MD5 4480c0d828fbe2e7ffc41b0145ae1bbc files/gnbd-client.rc 1269
+MD5 c28c25042c0faed71191ecd2b0f2effa files/gnbd-client.rc 2443
MD5 ac0809e436b7f6081623f9678a4cc449 files/gnbd-srv.rc 1947
MD5 a96ced2be5dbc837a2d23bd3fbecaa12 files/gnbd.devfs 332
MD5 79b84f9fc4b7bdee59dd1211663aef8d files/gnbdtab 177
@@ -12,7 +12,7 @@ MD5 59f3ca3db34191305528a95653f41692 files/digest-gnbd-1.0_pre13 65
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFCQN2ngMUyd/cdjWsRAldIAJ4mMMpdUgUHThflC5le6oM4kc6gJgCfWQmu
-W8zpimlaNiu6sveQ5EHHCVg=
-=Ujnn
+iD8DBQFCQYCigMUyd/cdjWsRAhq9AKCF5uDm1yRaO8++qe0SHZFw6OqmKgCfaNWq
+uZlvJejUyTWWddZRsTtIjUc=
+=SCrW
-----END PGP SIGNATURE-----
diff --git a/sys-cluster/gnbd/files/gnbd-client.rc b/sys-cluster/gnbd/files/gnbd-client.rc
index 95c51fee400c..12ae6cb637c5 100755
--- a/sys-cluster/gnbd/files/gnbd-client.rc
+++ b/sys-cluster/gnbd/files/gnbd-client.rc
@@ -1,7 +1,7 @@
#!/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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/gnbd/files/gnbd-client.rc,v 1.2 2005/03/23 14:09:48 xmerlin Exp $
depend() {
use dns logger
@@ -31,6 +31,39 @@ start() {
stop() {
+ local sig retry
+ local remaining="$(awk '$3 ~ /gfs/ && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+
+ if [ -z "${remaining}" ]
+ then
+ ebegin "Unmounting GFS filesystems (GNBDs imported devices)"
+ eend 0
+ else
+ sig=
+ retry=3
+ while [ -n "${remaining}" -a "${retry}" -gt 0 ]
+ do
+ if [ "${retry}" -lt 3 ]
+ then
+ ebegin "Unmounting GFS filesystems (retry)"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems this retry"
+ else
+ ebegin "Unmounting GFS filesystems"
+ umount ${remaining} &>/dev/null
+ eend $? "Failed to unmount GFS filesystems"
+ fi
+ remaining="$(awk '$3 ~ /gfs/ && $1 ~ /\/dev\/gnbd\// { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
+ [ -z "${remaining}" ] && break
+ /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
+ sleep 5
+ retry=$((${retry} -1))
+ sig=-9
+ done
+ fi
+
+
+
local GNBD_MONITOR_PROC
ebegin "Unimporting all GNBDs devices"