gluster / glusterfs

Gluster Filesystem : Build your distributed storage in minutes
https://www.gluster.org
GNU General Public License v2.0
4.62k stars 1.08k forks source link

bashisms in shell scripts #2922

Open the-me1988 opened 2 years ago

the-me1988 commented 2 years ago

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

stale[bot] commented 2 years ago

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.

the-me1988 commented 2 years ago

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]

sac commented 2 years ago

A related issue #3598

stale[bot] commented 1 year ago

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.

the-me1988 commented 1 year ago

ping

stale[bot] commented 11 months ago

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.