From mboxrd@z Thu Jan 1 00:00:00 1970 From: lhh@sourceware.org Date: 13 Dec 2006 18:28:42 -0000 Subject: [Cluster-devel] cluster/rgmanager/src/resources fs.sh Message-ID: <20061213182842.22839.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: cluster Branch: RHEL4 Changes by: lhh at sourceware.org 2006-12-13 18:28:41 Modified files: rgmanager/src/resources: fs.sh Log message: Fix #217147; patch by Navid Sheikhol-Eslami (navid redhat com) Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.18&r2=1.4.2.19 --- cluster/rgmanager/src/resources/fs.sh 2006/11/03 16:26:19 1.4.2.18 +++ cluster/rgmanager/src/resources/fs.sh 2006/12/13 18:28:41 1.4.2.19 @@ -496,6 +496,18 @@ # +# trim_trailing_slash path +# +# Trim trailing slash from given path. +# +trim_trailing_slash() { + declare mpath=$1 + + echo $mpath | sed -e 's/\/*$//' +} + + +# # isMounted device mount_point # # Check to see if the device is mounted. Print a warning if its not @@ -523,6 +535,8 @@ do #echo "spec=$1 dev=$dev tmp_dev=$tmp_dev" tmp_dev=$(real_device $tmp_dev) + tmp_mp=$(trim_trailing_slash $tmp_mp) + mp=$(trim_trailing_slash $mp) if [ -n "$tmp_dev" -a "$tmp_dev" = "$dev" ]; then #