diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2017-09-02 06:50:50 -0400 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-09-06 07:45:01 +0000 |
commit | 97f547c7822980aca2ec4cbbe236b930bab38b76 (patch) | |
tree | e1057d6baa814f42aaa63eda218d7e059f3e095b | |
parent | c8c56b9a53471792a126f8e46f32ce7190eac10c (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
Cherry picked from commit c0406501f0b4295a9917d31574baa2e462a18799:
> 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>
Reported-by: Michael Lundkvist <brels.debian@solske.net>
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Debian BZ: 873878
Change-Id: I33003183b9bc6459cae28c565125e6b2bd1eaa47
BUG: 1488119
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/18205
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rwxr-xr-x | xlators/mount/fuse/utils/mount.glusterfs.in | 5 |
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 826991ba402..409e32163f7 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -664,8 +664,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 '/'); |