cluster: RHEL55 - rgmanager: Fix bind mount handling in fs.sh
Lon Hohberger
lon at fedoraproject.org
Tue Dec 15 16:33:36 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b5be828615a2ed7bd95a3796d96f5cc536e2adc7
Commit: b5be828615a2ed7bd95a3796d96f5cc536e2adc7
Parent: d6d754c65ab82be2cf4817a40b7783f37127ec6b
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Tue Dec 15 11:28:51 2009 -0500
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Dec 15 11:32:15 2009 -0500
rgmanager: Fix bind mount handling in fs.sh
Don't log warnings for every bind mount found for a
mount point. Instead, log one warning if and only
if the file system is not mounted in the correct
location.
Resolves: bz526286
Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
rgmanager/src/resources/fs.sh | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh
index ac41cf3..477391c 100755
--- a/rgmanager/src/resources/fs.sh
+++ b/rgmanager/src/resources/fs.sh
@@ -570,6 +570,8 @@ isMounted () {
typeset mp tmp_mp
typeset dev tmp_dev
typeset ret=$FAIL
+ typeset found=1
+ typeset poss_mp
if [ $# -ne 2 ]; then
ocf_log err "Usage: isMounted device mount_point"
@@ -607,14 +609,21 @@ isMounted () {
# Check to see if its mounted in the right
# place
#
- if [ -n "$tmp_mp" -a "$tmp_mp" != "$mp" ]; then
- ocf_log warn \
-"Device $dev is mounted on $tmp_mp instead of $mp"
+ if [ -n "$tmp_mp" ]; then
+ if [ "$tmp_mp" != "$mp" ]; then
+ poss_mp=$tmp_mp
+ else
+ found=0
+ fi
fi
ret=$YES
fi
done < /proc/mounts
+ if [ $found -ne 0 ]; then
+ ocf_log warn "Device $dev is mounted on $poss_mp instead of $mp"
+ fi
+
return $ret
}
More information about the cluster-commits
mailing list