summaryrefslogtreecommitdiffstats
path: root/xlators/mount
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2017-09-02 06:50:50 -0400
committerNiels de Vos <ndevos@redhat.com>2017-09-05 09:17:20 +0000
commitc0406501f0b4295a9917d31574baa2e462a18799 (patch)
tree92dc9fa7c330e1b2598fc11a18c2916052f22d6e /xlators/mount
parentd692f167662300ffad8d3ed44672182130025c75 (diff)
scripts: mount.glusterfs contains non-portable bashisms
Debian's default shell is dash, i.e. /bin/sh -> dash, which doesn't support bash extensions Reported-by: "Michael Lundkvist" <brels.debian@solske.net> Reported-by: pmatthaei@debian.org Debian BZ: 873878 Change-Id: I33003183b9bc6459cae28c565125e6b2bd1eaa47 BUG: 1487830 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/18184 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mount')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index 216d03c4182..ea7205b95e2 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -673,8 +673,9 @@ main ()
[ -n "$volume_str" ] && {
volume_id=$volume_str
volume_str_temp=$volume_str
- [ ${volume_str:0:1} = '/' ] && {
- volume_str_temp=${volume_str:1}
+ first_char=$(echo "$volume_str" | cut -c 1)
+ [ ${first_char} = '/' ] && {
+ volume_str_temp=$(echo "$volume_str" | cut -c 2-)
}
[ $(echo $volume_str_temp | grep -c "/") -eq 1 ] && {
volume_id=$(echo "$volume_str_temp" | cut -f1 -d '/');