glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

bashisms in shell scripts

Open the-me1988 opened this issue 3 years ago • 6 comments

Hello,

with 10.0 there are some new bashishms in some shell scripts:

bash-term-in-posix-shell [sbin/mount.glusterfs:366] '[ "$syntax_status" ==' bash-term-in-posix-shell [sbin/mount.glusterfs:90] '[ "$servers" ==' bash-term-in-posix-shell [usr/lib/x86_64-linux-gnu/glusterfs/gfind_missing_files/gfid_to_path.sh:24] '${gfid:0:2}' bash-term-in-posix-shell [usr/lib/x86_64-linux-gnu/glusterfs/gfind_missing_files/gfind_missing_files.sh:32] '/dev/tcp'

Debians advices for it are:

N: This script is marked as running under /bin/sh, but it seems to use a feature found in bash but not in the SUSv3 or POSIX shell specification. N: Some examples are: N: - == in a test, it should use = instead - read without a variable in the argument - function to define a function - source instead of . - . command args, passing arguments to commands N: via source is not supported - {foo,bar} instead of foo bar - [[ test ]] instead of [ test ] (requires a Korn shell) - type instead of which or command -v

the-me1988 avatar Nov 02 '21 08:11 the-me1988

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Jun 04 '22 01:06 stale[bot]

This issue still exists in 10.2:

bash-term-in-posix-shell '${gfid:0:2}' [usr/lib/x86_64-linux-gnu/glusterfs/gfind_missing_files/gfid_to_path.sh:24] bash-term-in-posix-shell '/dev/tcp' [usr/lib/x86_64-linux-gnu/glusterfs/gfind_missing_files/gfind_missing_files.sh:32]

the-me1988 avatar Jun 15 '22 14:06 the-me1988

A related issue #3598

sac avatar Jun 16 '22 04:06 sac

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Jan 17 '23 04:01 stale[bot]

ping

the-me1988 avatar Jan 17 '23 08:01 the-me1988

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Sep 17 '23 06:09 stale[bot]