diff --git a/api/examples/autogen.sh b/api/examples/autogen.sh index 1fee6be11bb..53ddf2d7794 100755 --- a/api/examples/autogen.sh +++ b/api/examples/autogen.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash aclocal autoconf diff --git a/autogen.sh b/autogen.sh index e10b895619b..c554ec5248e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash echo echo ... GlusterFS autogen ... diff --git a/build-aux/config.guess.dist b/build-aux/config.guess.dist index 881ba7a0438..69f9ccbc7b2 100755 --- a/build-aux/config.guess.dist +++ b/build-aux/config.guess.dist @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # This script is intentionally left empty. Distributions that package GlusterFS # may want to to replace it with an updated copy from the automake project. diff --git a/build-aux/config.sub.dist b/build-aux/config.sub.dist index c5a0dbad282..33c2672b3df 100755 --- a/build-aux/config.sub.dist +++ b/build-aux/config.sub.dist @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # This script is intentionally left empty. Distributions that package GlusterFS # may want to to replace it with an updated copy from the automake project. diff --git a/build-aux/pkg-version b/build-aux/pkg-version index 17ceab70c03..4b39517035c 100755 --- a/build-aux/pkg-version +++ b/build-aux/pkg-version @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # To override version/release from git, # create VERSION file containing text with version/release diff --git a/extras/LinuxRPM/make_glusterrpms b/extras/LinuxRPM/make_glusterrpms index 3156af97870..030b86220d0 100755 --- a/extras/LinuxRPM/make_glusterrpms +++ b/extras/LinuxRPM/make_glusterrpms @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ( cd $(realpath $(dirname $0))/../.. || exit 1 diff --git a/extras/Solaris/checkinstall b/extras/Solaris/checkinstall index bbc05a1bd7b..b375aa1e3ff 100644 --- a/extras/Solaris/checkinstall +++ b/extras/Solaris/checkinstall @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # expected_platform="i386" # diff --git a/extras/backend-cleanup.sh b/extras/backend-cleanup.sh index d2bde3db4a0..6d90f3aea3e 100644 --- a/extras/backend-cleanup.sh +++ b/extras/backend-cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script can be used to cleanup the 'cluster/distribute' translator's # stale link files. One may choose to run this only when number of subvolumes diff --git a/extras/backend-xattr-sanitize.sh b/extras/backend-xattr-sanitize.sh index 3967654cf47..6e2a05393dc 100755 --- a/extras/backend-xattr-sanitize.sh +++ b/extras/backend-xattr-sanitize.sh @@ -1,7 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash # Each entry in the array below is a regular expression to match stale keys - xs=("trusted.glusterfs.createtime" "trusted.glusterfs.version" "trusted.glusterfs.afr.data-pending" @@ -10,10 +9,12 @@ xs=("trusted.glusterfs.createtime" absolute_path() { - local dir=$(dirname "$1"); - local base=$(basename "$1"); + local dir + local base + dir=$(dirname "$1"); + base=$(basename "$1"); cd "$dir"; - echo $(pwd)/"$base"; + echo "$(pwd)/$base"; cd - >/dev/null; } @@ -23,9 +24,9 @@ cleanup() sanitizee=$(absolute_path "$1"); stale_keys=$( - for pattern in ${xs[@]}; do + for pattern in "${xs[@]}"; do getfattr -d -m "$pattern" "$sanitizee" 2>/dev/null | - grep = | cut -f1 -d=; + grep -e '=' | cut -f1 -d '='; done ) @@ -45,7 +46,7 @@ crawl() this_script=$(absolute_path "$0"); export sanitize=yes; - find "$1" -exec "$this_script" {} \; + find "$1" \( -exec "$this_script" {} \; \) } diff --git a/extras/benchmarking/launch-script.sh b/extras/benchmarking/launch-script.sh index 5d5050d4146..17bc66daabb 100755 --- a/extras/benchmarking/launch-script.sh +++ b/extras/benchmarking/launch-script.sh @@ -1,18 +1,18 @@ -#!/bin/sh +#!/usr/bin/env bash # This script is to launch the script in parallel across all the nodes. mount_point="/mnt/glusterfs" -path_to_script="$mount_point}/benchmark/local-script.sh" +path_to_script="${mount_point}/benchmark/local-script.sh" num_hosts=8 for i in $(seq 1 $num_hosts); do - ssh node$i path_to_script & + ssh "node${i}" \""${path_to_script}"\" & done sleep 3; -touch ${mount_point}/benchmark/start-test +touch "${mount_point}"/benchmark/start-test diff --git a/extras/benchmarking/local-script.sh b/extras/benchmarking/local-script.sh index 80a7fafe816..e4f9b411f33 100755 --- a/extras/benchmarking/local-script.sh +++ b/extras/benchmarking/local-script.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # This script needs to be present on glusterfs mount, (ie, on every node which wants to run benchmark) @@ -10,15 +10,15 @@ count=8 mkdir -p testdir; mkdir -p output; -echo > ${result} +echo > "${result}" while [ ! -e start-test ]; do sleep 1; done; -for i in $(seq 1 5); do +for (( i = 1 ; i <= 5 ; i = i + 1 )); do # write - dd if=${ifilename} of=${ofilename} bs=${blocksize} count=${count} 2>&1 | tail -n 1 | cut -f 8,9 -d ' ' >> ${result} ; + dd if="${ifilename}" of="${ofilename}" bs="${blocksize}" count="${count}" 2>&1 | tail -n 1 | cut -f 8,9 -d ' ' >> "${result}" ; # read #dd if=${ofilename} of=/dev/null bs=${blocksize} count=${count} 2>&1 | tail -n 1 | cut -f 8,9 -d ' ' >> ${result} ; done diff --git a/extras/clang-checker.sh b/extras/clang-checker.sh index 4909d3adfcd..cc3ef14f4e3 100755 --- a/extras/clang-checker.sh +++ b/extras/clang-checker.sh @@ -41,18 +41,18 @@ TBACKUP_DIR=${TARGET_DIR}/backup declare -A DICT_B declare -A DICT_T -declare -A ARR -declare -A FILES +declare -a ARR +declare -a FILES function identify_changes () { MODIFIED_DATA=$(git show --name-status --oneline | tail -n +2) FLAG=0 for i in ${MODIFIED_DATA}; do if [ $FLAG -eq 1 ]; then - ARR+="$(dirname $i) "; + ARR+=( "$(dirname "${i}") " ); FLAG=0; fi - if [ $i = 'M' ] || [ $i = 'A' ]; then + if [ "${i}" = 'M' ] || [ "${i}" = 'A' ]; then FLAG=1; fi done @@ -60,14 +60,14 @@ function identify_changes () { MODIFIED_DIR=$(echo "${ARR[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') for i in $MODIFIED_DIR; do # run only in directories which has Makefile - if [ $(find ./$i -iname "makefile*" | wc -c) -gt 0 ]; then + if [ "$(find "./${i}" -iname "makefile*" | wc -c)" -gt 0 ]; then # skip 'doc' and '.'(top) directory if [ "xx$i" != "xxdoc" ] && [ "xx$i" != "xx." ]; then - FILES+="$i " + FILES+=( "$i " ) fi fi done - if [ -z $FILES ]; then + if [ -z "${FILES}" ]; then echo "Probably no changes made to 'c' files" exit; fi @@ -76,12 +76,12 @@ function identify_changes () { function check_prerequisites () { if ! type "clang" 2> /dev/null; then echo -e "\ntry after installing clang and scan-build..." - echo "useful info at http://clang-analyzer.llvm.org/installation.html\n" + echo -e "useful info at http://clang-analyzer.llvm.org/installation.html\n" echo -e "hint: 'dnf -y install clang-analyzer.noarch'\n" exit 1; elif ! type "scan-build" 2> /dev/null; then echo -e "\ntry after installing scan-build..." - echo "useful info at http://clang-analyzer.llvm.org/installation.html" + echo -e "useful info at http://clang-analyzer.llvm.org/installation.html" echo -e "hint: 'dnf -y install clang-analyzer.noarch'\n" exit 1; fi @@ -90,8 +90,8 @@ function check_prerequisites () { function force_terminate () { echo -e "\nreceived a signal to force terminate ..\n" git am --abort 2> /dev/null - git am ${PATCH_NAME} - rm -f ${REPORTS_DIR}/${PATCH_NAME} + git am "${PATCH_NAME}" + rm -f "${REPORTS_DIR}/${PATCH_NAME}" exit 1; } @@ -99,22 +99,22 @@ function run_scanbuild () { local CLANG=$(which clang) local SCAN_BUILD=$(which scan-build) local ORIG_COMMIT=$(git rev-parse --verify HEAD^) - PATCH_NAME=$(git format-patch $ORIG_COMMIT) + PATCH_NAME=$(git format-patch "${ORIG_COMMIT}") echo -e "\n| Performing clang analysis on:" \ "$(git log --pretty=format:"%h - '%s' by %an" -1) ... |\n" - echo -e "Changes are identified in '${FILES[@]}' directorie[s]\n" + echo -e "Changes are identified in '${FILES[*]}' directorie[s]\n" if [ -d "${BRESULTS_DIR}" ]; then - mkdir -p ${BBACKUP_DIR} ${TBACKUP_DIR} - mv ${BRESULTS_DIR} \ - ${BBACKUP_DIR}/results_$(ls -l ${BBACKUP_DIR} | wc -l) - mv ${TRESULTS_DIR} \ - ${TBACKUP_DIR}/results_$(ls -l ${TBACKUP_DIR} | wc -l) + mkdir -p "${BBACKUP_DIR}" "${TBACKUP_DIR}" + mv "${BRESULTS_DIR}" \ + "${BBACKUP_DIR}/results_$(ls -l "${BBACKUP_DIR}" | wc -l)" + mv "${TRESULTS_DIR}" \ + "${TBACKUP_DIR}/results_$(ls -l "${TBACKUP_DIR}" | wc -l)" fi - for DIR in ${FILES[@]}; do - mkdir -p ${BRESULTS_DIR}/$(echo ${DIR} | sed 's/\//_/g') - mkdir -p ${TRESULTS_DIR}/$(echo ${DIR} | sed 's/\//_/g') + for DIR in "${FILES[@]}" ; do + mkdir -p "${BRESULTS_DIR}/$(echo "${DIR}" | sed 's/\//_/g')" + mkdir -p "${TRESULTS_DIR}/$(echo "${DIR}" | sed 's/\//_/g')" done # get nproc info case $(uname -s) in @@ -132,110 +132,110 @@ function run_scanbuild () { # build complete source code for sake of dependencies echo -e "\n# make -j${NPROC} ..." - make -j${NPROC} 1>/dev/null + make -j"${NPROC}" 1>/dev/null - for DIR in ${FILES[@]}; do - if [ $(find ./$i -iname "makefile*" | wc -c) -gt 0 ]; then - make clean -C ${DIR} 1>/dev/null + for DIR in "${FILES[@]}" ; do + if [ "$(find "./${i}" -iname "makefile*" | wc -c)" -gt 0 ]; then + make clean -C "${DIR}" 1>/dev/null echo -e "\n| Analyzing ${DIR} without commit ... |\n" # run only in directory where changes are made - ${SCAN_BUILD} -o ${BRESULTS_DIR}/$(echo ${DIR} | sed 's/\//_/g') \ - --use-analyzer=${CLANG} make -j${NPROC} -C ${DIR} + ${SCAN_BUILD} -o "${BRESULTS_DIR}/$(echo "${DIR}" | sed 's/\//_/g')" \ + --use-analyzer="${CLANG}" make -j"${NPROC}" -C "${DIR}" fi done echo -e "\n| Analyzing without commit complete ... |\n" - git am ${PATCH_NAME} + git am "${PATCH_NAME}" trap - INT TERM QUIT EXIT # In case commit has changes to configure stuff ? echo -e "\n# make clean ..." make clean 1>/dev/null echo -e "\n# ./autogen.sh && ./configure --with-previous-options ..." - ${REPORTS_DIR}/autogen.sh 2>/dev/null - ${REPORTS_DIR}/configure --with-previous-options 1>/dev/null + "${REPORTS_DIR}"/autogen.sh 2>/dev/null + "${REPORTS_DIR}"/configure --with-previous-options 1>/dev/null echo -e "\n# make -j${NPROC} ..." - make -j${NPROC} 1>/dev/null + make -j"${NPROC}" 1>/dev/null - for DIR in ${FILES[@]}; do - if [ $(find ./$i -iname "makefile*" | wc -c) -gt 0 ]; then - make clean -C ${DIR} 1>/dev/null + for DIR in "${FILES[@]}" ; do + if [ "$(find "./${i}" -iname "makefile*" | wc -c)" -gt 0 ]; then + make clean -C "${DIR}" 1>/dev/null echo -e "\n| Analyzing ${DIR} with commit ... |\n" # run only in directory where changes are made - ${SCAN_BUILD} -o ${TRESULTS_DIR}/$(echo ${DIR} | sed 's/\//_/g') \ - --use-analyzer=${CLANG} make -j${NPROC} -C ${DIR} + ${SCAN_BUILD} -o "${TRESULTS_DIR}/$(echo "${DIR}" | sed 's/\//_/g')" \ + --use-analyzer="${CLANG}" make -j"${NPROC}" -C "${DIR}" fi done echo -e "\n| Analyzing with commit complete ... |\n" - rm -f ${REPORTS_DIR}/${PATCH_NAME} + rm -f "${REPORTS_DIR}/${PATCH_NAME}" } function count_for_baseline () { - for DIR in ${FILES[@]}; do - HTMLS_DIR=${BRESULTS_DIR}/$(echo ${DIR} | - sed 's/\//_/g')/$(ls ${BRESULTS_DIR}/$(echo ${DIR} | - sed 's/\//_/g')/); + for DIR in "${FILES[@]}"; do + HTMLS_DIR=${BRESULTS_DIR}/$(echo "${DIR}" | + sed 's/\//_/g')/$(ls "${BRESULTS_DIR}"/"$(echo "${DIR}" | + sed 's/\//_/g')"/); - local NAMES_OF_BUGS_B=$(grep -n "SUMM_DESC" ${HTMLS_DIR}/index.html | + local NAMES_OF_BUGS_B=$(grep -n "SUMM_DESC" "${HTMLS_DIR}/index.html" | cut -d"<" -f3 | cut -d">" -f2 | sed 's/[^a-zA-Z0]/_/g' | tr '\n' ' ') - local NO_OF_BUGS_B=$(grep -n "SUMM_DESC" ${HTMLS_DIR}/index.html | + local NO_OF_BUGS_B=$(grep -n "SUMM_DESC" "${HTMLS_DIR}/index.html" | cut -d"<" -f5 | cut -d">" -f2 | tr '\n' ' ') local count_B=0; - read -a BUG_NAME_B <<<$NAMES_OF_BUGS_B - read -a BUG_COUNT_B <<<$NO_OF_BUGS_B - for i in ${BUG_NAME_B[@]}; + read -r -a BUG_NAME_B <<<"${NAMES_OF_BUGS_B}" + read -r -a BUG_COUNT_B <<<"${NO_OF_BUGS_B}" + for i in "${BUG_NAME_B[@]}"; do - if [ ! -z ${DICT_B[$i]} ]; then - DICT_B[$i]=$(expr ${BUG_COUNT_B[count_B]} + ${DICT_B[$i]}); + if [ -n "${DICT_B[$i]}" ]; then + DICT_B[$i]=$(expr "${BUG_COUNT_B[count_B]}" + "${DICT_B[$i]}"); else DICT_B+=([$i]=${BUG_COUNT_B[count_B]}); fi - count_B=$(expr $count_B + 1) + count_B=$(expr "${count_B}" + 1) done done echo -e "\nBASELINE BUGS LIST (before applying patch):" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - for key_B in ${!DICT_B[@]}; do + for key_B in "${!DICT_B[@]}"; do echo "${key_B} --> ${DICT_B[${key_B}]}" | sed 's/_/ /g' | tr -s ' ' done } function count_for_target () { - for DIR in ${FILES[@]}; do - HTMLS_DIR=${TRESULTS_DIR}/$(echo ${DIR} | - sed 's/\//_/g')/$(ls ${TRESULTS_DIR}/$(echo ${DIR} | - sed 's/\//_/g')/); + for DIR in "${FILES[@]}"; do + HTMLS_DIR="${TRESULTS_DIR}/$(echo "${DIR}" | + sed 's/\//_/g')/$(ls "${TRESULTS_DIR}/$(echo "${DIR}" | + sed 's/\//_/g')"/)"; - local NAME_OF_BUGS_T=$(grep -n "SUMM_DESC" ${HTMLS_DIR}/index.html | + local NAME_OF_BUGS_T=$(grep -n "SUMM_DESC" "${HTMLS_DIR}/index.html" | cut -d"<" -f3 | cut -d">" -f2 | sed 's/[^a-zA-Z0]/_/g'| tr '\n' ' ') - local NO_OF_BUGS_T=$(grep -n "SUMM_DESC" ${HTMLS_DIR}/index.html | + local NO_OF_BUGS_T=$(grep -n "SUMM_DESC" "${HTMLS_DIR}/index.html" | cut -d"<" -f5 | cut -d">" -f2 | tr '\n' ' ') local count_T=0; - read -a BUG_NAME_T <<<$NAME_OF_BUGS_T - read -a BUG_COUNT_T <<<$NO_OF_BUGS_T + read -r -a BUG_NAME_T <<<"${NAME_OF_BUGS_T}" + read -r -a BUG_COUNT_T <<<"${NO_OF_BUGS_T}" - for i in ${BUG_NAME_T[@]}; + for i in "${BUG_NAME_T[@]}" ; do - if [ ! -z ${DICT_T[$i]} ]; then - DICT_T[$i]=$(expr ${BUG_COUNT_T[count_T]} + ${DICT_T[$i]}); + if [ -n "${DICT_T[$i]}" ]; then + DICT_T[$i]=$(expr "${BUG_COUNT_T[count_T]}" + "${DICT_T[$i]}"); else DICT_T+=([$i]=${BUG_COUNT_T[count_T]}); fi - count_T=$(expr $count_T + 1) + count_T=$(expr "${count_T}" + 1) done done echo -e "\nTARGET BUGS LIST (after applying patch):" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - for key_T in ${!DICT_T[@]}; do + for key_T in "${!DICT_T[@]}"; do echo "${key_T} --> ${DICT_T[${key_T}]}" | sed 's/_/ /g' | tr -s ' ' done } @@ -244,7 +244,7 @@ function array_contains () { local SEEKING=$1; shift local IN=1 for ELEMENT; do - if [[ $ELEMENT == $SEEKING ]]; then + if [[ $ELEMENT == "${SEEKING}" ]]; then IN=0 break fi @@ -264,19 +264,19 @@ function main () { echo "~~~~~~~~~~~~~~~~~~~~~~~~~~" FLAG=0 - for BUG in ${!DICT_T[@]}; do - array_contains $BUG "${!DICT_B[@]}" + for BUG in "${!DICT_T[@]}"; do + array_contains "${BUG}" "${!DICT_B[@]}" if [ $? -eq 1 ]; then - echo "New ${DICT_T[${BUG}]} Bug[s] introduced: $(echo $BUG | + echo "New ${DICT_T[${BUG}]} Bug[s] introduced: $(echo "${BUG}" | sed 's/_/ /g' | tr -s ' ')" FLAG=1 else - if [ ${BUG} != "All_Bugs" ]; then - if [ ${DICT_B[${BUG}]} -lt \ - ${DICT_T[${BUG}]} ]; then - echo "Extra $(expr ${DICT_T[${BUG}]} - \ - ${DICT_B[${BUG}]}) Bug[s] Introduced in: $(echo $BUG | + if [ "${BUG}" != "All_Bugs" ]; then + if [ "${DICT_B[${BUG}]}" -lt \ + "${DICT_T[${BUG}]}" ]; then + echo "Extra $(expr "${DICT_T[${BUG}]}" - \ + "${DICT_B[${BUG}]}") Bug[s] Introduced in: $(echo "${BUG}" | sed 's/_/ /g' | tr -s ' ')" FLAG=1 fi @@ -291,8 +291,8 @@ function main () { echo -e "Patch Value given by Clang analyzer '-1'\n" fi echo -e "\nExplore complete results at:" - find ${BRESULTS_DIR}/ -iname "index.html" - find ${TRESULTS_DIR}/ -iname "index.html" + find "${BRESULTS_DIR}/" -iname "index.html" + find "${TRESULTS_DIR}/" -iname "index.html" echo -e "\n================= Done with Clang Analysis =================\n" exit ${FLAG} diff --git a/extras/clear_xattrs.sh b/extras/clear_xattrs.sh index dd04731e8bd..b5062564cf3 100755 --- a/extras/clear_xattrs.sh +++ b/extras/clear_xattrs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Clear the trusted.gfid xattr in the brick tree diff --git a/extras/collect-system-stats.sh b/extras/collect-system-stats.sh index 865e70bbc11..aa5eb8c2f50 100755 --- a/extras/collect-system-stats.sh +++ b/extras/collect-system-stats.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ################################################################################ # Usage: collect-system-stats.sh # This script starts sar/top/iostat/vmstat processes which collect system stats diff --git a/extras/command-completion/gluster.bash b/extras/command-completion/gluster.bash index a096b62890f..95abd433ac5 100644 --- a/extras/command-completion/gluster.bash +++ b/extras/command-completion/gluster.bash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash GLUSTER_TOP_SUBOPTIONS1=" {nfs}, diff --git a/extras/control-cpu-load.sh b/extras/control-cpu-load.sh index 52dcf62fd9f..73e25fa8ad7 100755 --- a/extras/control-cpu-load.sh +++ b/extras/control-cpu-load.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash USAGE="This script provides a utility to control CPU utilization for any gluster daemon.In this, we use cgroup framework to configure CPU quota diff --git a/extras/control-mem.sh b/extras/control-mem.sh index 91b36f8107a..3c252973c90 100755 --- a/extras/control-mem.sh +++ b/extras/control-mem.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash USAGE="This commands provides a utility to control MEMORY utilization for any gluster daemon.In this, we use cgroup framework to configure MEMORY limit for diff --git a/extras/devel-tools/devel-vagrant/bootstrap.sh b/extras/devel-tools/devel-vagrant/bootstrap.sh index bbf9fa2c063..f1b2c0f4687 100644 --- a/extras/devel-tools/devel-vagrant/bootstrap.sh +++ b/extras/devel-tools/devel-vagrant/bootstrap.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash dnf install -y nfs-utils dnf install -y vim dnf install -y python2 python2-dnf libselinux-python libsemanage-python diff --git a/extras/devel-tools/devel-vagrant/up.sh b/extras/devel-tools/devel-vagrant/up.sh index 35cbe79d835..95a12053012 100755 --- a/extras/devel-tools/devel-vagrant/up.sh +++ b/extras/devel-tools/devel-vagrant/up.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash -vagrant up --no-provision $@ +vagrant up --no-provision "$@" vagrant provision diff --git a/extras/devel-tools/print-backtrace.sh b/extras/devel-tools/print-backtrace.sh index 33fbae288bc..f0777ee4b35 100755 --- a/extras/devel-tools/print-backtrace.sh +++ b/extras/devel-tools/print-backtrace.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # sample unresolved backtrace lines picked up from a brick log that should go # into a backtrace file eg. bt-file.txt: # /usr/lib64/glusterfs/3.8.4/xlator/cluster/replicate.so(+0x3ec81)[0x7fe4bc271c81] @@ -20,7 +20,7 @@ # Usage with source install: # print-packtrace.sh none bt-file.txt -function version_compare() { test $(echo $1|awk -F '.' '{print $1 $2 $3}') -gt $(echo $2|awk -F '.' '{print $1 $2 $3}'); } +function version_compare() { test "$(echo "$1"|awk -F '.' '{print $1 $2 $3}')" -gt "$(echo "$2"|awk -F '.' '{print $1 $2 $3}')"; } function Usage() { @@ -35,25 +35,25 @@ function Usage() debuginfo_rpm=$1 backtrace_file=$2 -if [ ! $debuginfo_rpm ] || [ ! $backtrace_file ]; then +if [ -z "$debuginfo_rpm" ] || [ -z "$backtrace_file" ]; then Usage exit 1 fi -if [ $debuginfo_rpm != "none" ]; then - if [ ! -f $debuginfo_rpm ]; then +if [ "$debuginfo_rpm" != "none" ]; then + if [ ! -f "$debuginfo_rpm" ]; then echo "no such rpm file: $debuginfo_rpm" exit 1 fi fi -if [ ! -f $backtrace_file ]; then +if [ ! -f "$backtrace_file" ]; then echo "no such backtrace file: $backtrace_file" exit 1 fi if [ "$debuginfo_rpm" != "none" ]; then - if ! file $debuginfo_rpm | grep RPM >/dev/null 2>&1 ; then + if ! file "$debuginfo_rpm" | grep RPM >/dev/null 2>&1 ; then echo "file does not look like an rpm: $debuginfo_rpm" exit 1 fi @@ -64,28 +64,28 @@ rpm_name="" debuginfo_path="" debuginfo_extension="" -if [ $debuginfo_rpm != "none" ]; then +if [ "$debuginfo_rpm" != "none" ]; then # extract the gluster debuginfo rpm to resolve the symbols against - rpm_name=$(basename $debuginfo_rpm '.rpm') - if [ -d $rpm_name ]; then + rpm_name=$(basename "$debuginfo_rpm" '.rpm') + if [ -d "$rpm_name" ]; then echo "directory already exists: $rpm_name" echo "please remove/move it and reattempt" exit 1 fi - mkdir -p $rpm_name - if version_compare $cpio_version "2.11"; then - rpm2cpio $debuginfo_rpm | cpio --quiet --extract --make-directories --preserve-modification-time --directory=$rpm_name + mkdir -p "$rpm_name" + if version_compare "$cpio_version" "2.11"; then + rpm2cpio "$debuginfo_rpm" | cpio --quiet --extract --make-directories --preserve-modification-time --directory=$rpm_name ret=$? else current_dir="$PWD" - cd $rpm_name - rpm2cpio $debuginfo_rpm | cpio --quiet --extract --make-directories --preserve-modification-time + cd "$rpm_name" + rpm2cpio "$debuginfo_rpm" | cpio --quiet --extract --make-directories --preserve-modification-time ret=$? - cd $current_dir + cd "$current_dir" fi if [ $ret -eq 1 ]; then echo "failed to extract rpm $debuginfo_rpm to $PWD/$rpm_name directory" - rm -rf $rpm_name + rm -rf "$rpm_name" exit 1 fi debuginfo_path="$PWD/$rpm_name/usr/lib/debug" @@ -96,20 +96,20 @@ else fi # NOTE: backtrace file should contain only the lines which need to be resolved -for bt in $(cat $backtrace_file) +while read -r bt do - libname=$(echo $bt | cut -f 1 -d '(') - addr=$(echo $bt | cut -f 2 -d '(' | cut -f 1 -d ')') + libname=$(echo "$bt" | cut -f 1 -d '(') + addr=$(echo "$bt" | cut -f 2 -d '(' | cut -f 1 -d ')') libpath=${debuginfo_path}${libname}${debuginfo_extension} - if [ ! -f $libpath ]; then + if [ ! -f "$libpath" ]; then continue fi - newbt=( $(eu-addr2line --functions --exe=$libpath $addr) ) + mapfile -t newbt < <(eu-addr2line --functions --exe="$libpath" "$addr") echo "$bt ${newbt[*]}" -done +done <"$backtrace_file" # remove the temporary directory -if [ -d $rpm_name ]; then - rm -rf $rpm_name +if [ -d "$rpm_name" ]; then + rm -rf "$rpm_name" fi diff --git a/extras/devel-tools/strace-brick.sh b/extras/devel-tools/strace-brick.sh index a140729111c..c4966ea9a16 100755 --- a/extras/devel-tools/strace-brick.sh +++ b/extras/devel-tools/strace-brick.sh @@ -1,14 +1,14 @@ -#!/bin/bash +#!/usr/bin/env bash # Usage: # nice -n -19 strace-brick.sh glusterfsd 50 brick_process_name=$1 min_watch_cpu=$2 -if [ ! $brick_process_name ]; then +if [ -z "$brick_process_name" ]; then brick_process_name=glusterfsd fi -if [ ! $min_watch_cpu ]; then +if [ -z "$min_watch_cpu" ]; then min_watch_cpu=50 fi @@ -18,13 +18,13 @@ break=false while ! $break; do - mypids=( $(pgrep $brick_process_name) ) + mapfile -t mypids < <(pgrep "$brick_process_name") echo "mypids: ${mypids[*]}" - pid_args=$(echo ${mypids[*]} | sed -e 's/ / -p /g;s/^/-p /') + pid_args=$(echo "${mypids[*]}" | sed -e 's/ / -p /g;s/^/-p /') echo "pid_args: $pid_args" - pcpu=( $(ps $pid_args -o pcpu -h ) ) + mapfile -t pcpu < <(ps "$pid_args" -o pcpu -h ) echo "pcpu: ${pcpu[*]}" wait_longer=false @@ -34,16 +34,19 @@ do echo "i: $i" echo "mypids[$i]: ${mypids[$i]}" - int_pcpu=$(echo ${pcpu[$i]} | cut -f 1 -d '.') + int_pcpu="$(echo "${pcpu[$i]}" | cut -f 1 -d '.')" echo "int_pcpu: $int_pcpu" - if [ ! $int_pcpu ] || [ ! $min_watch_cpu ]; then + if [ -z "$int_pcpu" ] || [ -z "$min_watch_cpu" ]; then break=true echo "breaking" fi - if [ $int_pcpu -ge $min_watch_cpu ]; then + if [ "$int_pcpu" -ge "$min_watch_cpu" ]; then wait_longer=true mydirname="${brick_process_name}-${mypids[$i]}-$(date --utc +'%Y%m%d-%H%M%S.%N')" - $(mkdir $mydirname && cd $mydirname && timeout --kill-after=5 --signal=KILL 60 nice -n -19 strace -p ${mypids[$i]} -ff -tt -T -o $brick_process_name) & + $(mkdir "$mydirname" \ + && cd "$mydirname" \ + && timeout --kill-after=5 --signal=KILL 60 nice -n -19 \ + strace -p "${mypids[$i]}" -ff -tt -T -o "$brick_process_name") & fi done diff --git a/extras/disk_usage_sync.sh b/extras/disk_usage_sync.sh index 85ee158f888..3ec8add0e46 100755 --- a/extras/disk_usage_sync.sh +++ b/extras/disk_usage_sync.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/bash # This script can be used to sync disk usage before activating quotas on GlusterFS. # There are two scenarios where quotas are used and this script has to be used accordingly - diff --git a/extras/distributed-testing/distributed-test-build-env b/extras/distributed-testing/distributed-test-build-env index cd68ff717da..931cc36c0a7 100644 --- a/extras/distributed-testing/distributed-test-build-env +++ b/extras/distributed-testing/distributed-test-build-env @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash GF_CONF_OPTS="--localstatedir=/var --sysconfdir /var/lib --prefix /usr --libdir /usr/lib64 \ --enable-bd-xlator=yes --enable-debug --enable-gnfs" diff --git a/extras/distributed-testing/distributed-test-build.sh b/extras/distributed-testing/distributed-test-build.sh index e8910d8425c..bb32c6960c2 100755 --- a/extras/distributed-testing/distributed-test-build.sh +++ b/extras/distributed-testing/distributed-test-build.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -EXTRA_CONFIGURE_ARGS="$@" +EXTRA_CONFIGURE_ARGS=( "$@" ) ASAN_REQUESTED=false -for arg in $EXTRA_CONFIGURE_ARGS; do - if [ $arg == "--with-asan" ]; then +for arg in "${EXTRA_CONFIGURE_ARGS[@]}"; do + if [ "$arg" == "--with-asan" ]; then echo "Requested ASAN, cleaning build first." make -j distclean || true touch .with_asan @@ -23,5 +23,5 @@ fi source extras/distributed-testing/distributed-test-build-env ./autogen.sh -./configure $GF_CONF_OPTS $EXTRA_CONFIGURE_ARGS +./configure "$GF_CONF_OPTS" "${EXTRA_CONFIGURE_ARGS[@]}" make -j diff --git a/extras/distributed-testing/distributed-test-env b/extras/distributed-testing/distributed-test-env index 8ef22534208..912fcfe8611 100644 --- a/extras/distributed-testing/distributed-test-env +++ b/extras/distributed-testing/distributed-test-env @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SMOKE_TESTS="\ tests/basic/*.t\ diff --git a/extras/distributed-testing/distributed-test.sh b/extras/distributed-testing/distributed-test.sh index 8f1e0310f33..1b64f85d291 100755 --- a/extras/distributed-testing/distributed-test.sh +++ b/extras/distributed-testing/distributed-test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash source ./extras/distributed-testing/distributed-test-env diff --git a/extras/ec-heal-script/correct_pending_heals.sh b/extras/ec-heal-script/correct_pending_heals.sh index c9f19dd7c89..15fd39fcb8f 100755 --- a/extras/ec-heal-script/correct_pending_heals.sh +++ b/extras/ec-heal-script/correct_pending_heals.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 Red Hat, Inc. # This file is part of GlusterFS. # diff --git a/extras/ec-heal-script/gfid_needing_heal_parallel.sh b/extras/ec-heal-script/gfid_needing_heal_parallel.sh index d7f53c97c33..c86442f31d4 100755 --- a/extras/ec-heal-script/gfid_needing_heal_parallel.sh +++ b/extras/ec-heal-script/gfid_needing_heal_parallel.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2019-2020 Red Hat, Inc. # This file is part of GlusterFS. # diff --git a/extras/file_size_contri.sh b/extras/file_size_contri.sh index 4f52a9a89b4..379f652f821 100755 --- a/extras/file_size_contri.sh +++ b/extras/file_size_contri.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script checks whether the contribution and disk-usage of a file is same. diff --git a/extras/ganesha/ocf/ganesha_grace b/extras/ganesha/ocf/ganesha_grace index ca219af7eb6..97f1db88fc6 100644 --- a/extras/ganesha/ocf/ganesha_grace +++ b/extras/ganesha/ocf/ganesha_grace @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2014 Anand Subramanian anands@redhat.com # Copyright (c) 2015 Red Hat Inc. diff --git a/extras/ganesha/ocf/ganesha_mon b/extras/ganesha/ocf/ganesha_mon index 7fbbf7037cc..63576f38064 100644 --- a/extras/ganesha/ocf/ganesha_mon +++ b/extras/ganesha/ocf/ganesha_mon @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2014 Anand Subramanian anands@redhat.com # Copyright (c) 2015 Red Hat Inc. diff --git a/extras/ganesha/ocf/ganesha_nfsd b/extras/ganesha/ocf/ganesha_nfsd index f91e8b6b8f7..bdf3e03a228 100644 --- a/extras/ganesha/ocf/ganesha_nfsd +++ b/extras/ganesha/ocf/ganesha_nfsd @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2014 Anand Subramanian anands@redhat.com # Copyright (c) 2015 Red Hat Inc. diff --git a/extras/ganesha/scripts/create-export-ganesha.sh b/extras/ganesha/scripts/create-export-ganesha.sh index 3040e8138b0..78a29686713 100755 --- a/extras/ganesha/scripts/create-export-ganesha.sh +++ b/extras/ganesha/scripts/create-export-ganesha.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #This script is called by glusterd when the user #tries to export a volume via NFS-Ganesha. @@ -30,8 +30,8 @@ function check_cmd_status() { if [ "$1" != "0" ] then - rm -rf $GANESHA_DIR/exports/export.$VOL.conf - sed -i /$VOL.conf/d $CONF + rm -rf "${GANESHA_DIR}"/exports/export."${VOL}".conf + sed -i /"${VOL}".conf/d "${CONF}" exit 1 fi } @@ -39,8 +39,8 @@ function check_cmd_status() if [ ! -d "$GANESHA_DIR/exports" ]; then - mkdir $GANESHA_DIR/exports - check_cmd_status `echo $?` + mkdir "${GANESHA_DIR}"/exports + check_cmd_status "$(echo $?)" fi function write_conf() @@ -51,16 +51,16 @@ echo -e "# WARNING : Using Gluster CLI will overwrite manual echo "EXPORT{" echo " Export_Id = 2;" -echo " Path = \"/$VOL\";" +echo " Path = \"/${VOL}\";" echo " FSAL {" echo " name = "GLUSTER";" echo " hostname=\"localhost\";" -echo " volume=\"$VOL\";" +echo " volume=\"${VOL}\";" echo " }" echo " Access_type = RW;" echo " Disable_ACL = true;" echo ' Squash="No_root_squash";' -echo " Pseudo=\"/$VOL\";" +echo " Pseudo=\"/${VOL}\";" echo ' Protocols = "3", "4" ;' echo ' Transports = "UDP","TCP";' echo ' SecType = "sys";' @@ -69,24 +69,24 @@ echo " }" } if [ "$OPTION" = "on" ]; then - if ! (cat $CONF | grep $VOL.conf\"$ ) + if ! (cat "${CONF}" | grep "${VOL}.conf\"$" ) then - write_conf $@ > $GANESHA_DIR/exports/export.$VOL.conf - echo "%include \"$GANESHA_DIR/exports/export.$VOL.conf\"" >> $CONF - count=`ls -l $GANESHA_DIR/exports/*.conf | wc -l` + write_conf "$@" > "${GANESHA_DIR}"/exports/export."${VOL}".conf + echo "%include \"${GANESHA_DIR}/exports/export.${VOL}.conf\"" >> "${CONF}" + count=$(ls -l $GANESHA_DIR/exports/*.conf | wc -l) if [ "$count" = "1" ] ; then EXPORT_ID=2 else - EXPORT_ID=`cat $GANESHA_DIR/.export_added` - check_cmd_status `echo $?` - EXPORT_ID=EXPORT_ID+1 + EXPORT_ID=$(cat "${GANESHA_DIR}"/.export_added) + check_cmd_status "$(echo $?)" + EXPORT_ID=$((EXPORT_ID+1)) sed -i s/Export_Id.*/"Export_Id= $EXPORT_ID ;"/ \ - $GANESHA_DIR/exports/export.$VOL.conf - check_cmd_status `echo $?` + "${GANESHA_DIR}/exports/export.${VOL}.conf" + check_cmd_status "$(echo $?)" fi - echo $EXPORT_ID > $GANESHA_DIR/.export_added + echo "${EXPORT_ID}" > "${GANESHA_DIR}/.export_added" fi else - rm -rf $GANESHA_DIR/exports/export.$VOL.conf - sed -i /$VOL.conf/d $CONF + rm -rf "${GANESHA_DIR}/exports/export.${VOL}.conf" + sed -i "/${VOL}.conf/d" "${CONF}" fi diff --git a/extras/ganesha/scripts/dbus-send.sh b/extras/ganesha/scripts/dbus-send.sh index 9d613a0e7ad..5de8f4a611f 100755 --- a/extras/ganesha/scripts/dbus-send.sh +++ b/extras/ganesha/scripts/dbus-send.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Try loading the config from any of the distro # specific configuration locations @@ -18,13 +18,13 @@ fi GANESHA_DIR=${1%/} OPTION=$2 VOL=$3 -CONF=$GANESHA_DIR"/ganesha.conf" +CONF=${GANESHA_DIR}"/ganesha.conf" function check_cmd_status() { if [ "$1" != "0" ] then - logger "dynamic export failed on node :${hostname -s}" + logger "dynamic export failed on node :$(hostname -s)" fi } @@ -33,9 +33,9 @@ function dynamic_export_add() { dbus-send --system \ --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \ -org.ganesha.nfsd.exportmgr.AddExport string:$GANESHA_DIR/exports/export.$VOL.conf \ -string:"EXPORT(Path=/$VOL)" - check_cmd_status `echo $?` +org.ganesha.nfsd.exportmgr.AddExport string:"${GANESHA_DIR}/exports/export.${VOL}.conf" \ +string:"EXPORT(Path=/${VOL})" + check_cmd_status "$(echo $?)" } #This function removes an export dynamically(uses the export_id of the export) @@ -50,21 +50,21 @@ function dynamic_export_remove() removed_id=$(dbus-send --type=method_call --print-reply --system \ --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \ org.ganesha.nfsd.exportmgr.ShowExports | grep -B 1 -we \ - "/"$VOL -e "/"$VOL"/" | grep uint16 | awk '{print $2}' \ + "/${VOL}" -e "/${VOL}/" | grep uint16 | awk '{print $2}' \ | head -1) dbus-send --print-reply --system \ --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \ -org.ganesha.nfsd.exportmgr.RemoveExport uint16:$removed_id - check_cmd_status `echo $?` +org.ganesha.nfsd.exportmgr.RemoveExport uint16:"${removed_id}" + check_cmd_status "$(echo $?)" } if [ "$OPTION" = "on" ]; then - dynamic_export_add $@ + dynamic_export_add "$@" fi if [ "$OPTION" = "off" ]; then - dynamic_export_remove $@ + dynamic_export_remove "$@" fi diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh index 4b61a6db9a1..e5162139589 100644 --- a/extras/ganesha/scripts/ganesha-ha.sh +++ b/extras/ganesha/scripts/ganesha-ha.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2015-2016 Red Hat Inc. All Rights Reserved # @@ -20,7 +20,7 @@ # ensure that the NFS GRACE DBUS signal is sent after the VIP moves to # the new host. -GANESHA_HA_SH=$(realpath $0) +GANESHA_HA_SH=$(realpath "$0") HA_NUM_SERVERS=0 HA_SERVERS="" HA_VOL_NAME="gluster_shared_storage" @@ -60,7 +60,7 @@ GANESHA_CONF= function find_rhel7_conf { - while [[ $# > 0 ]] + while [[ $# -gt 0 ]] do key="$1" case $key in @@ -75,9 +75,9 @@ function find_rhel7_conf done } -if [ -z ${CONFFILE} ] +if [ -z "${CONFFILE}" ] then - find_rhel7_conf ${OPTIONS} + find_rhel7_conf "${OPTIONS}" fi @@ -126,15 +126,15 @@ manage_service () option="no" fi ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \ -${SECRET_PEM} root@${new_node} "${GANESHA_HA_SH} --setup-ganesha-conf-files $HA_CONFDIR $option" +${SECRET_PEM} root@"${new_node}" "${GANESHA_HA_SH} --setup-ganesha-conf-files $HA_CONFDIR $option" if [[ "${SERVICE_MAN}" == "/bin/systemctl" ]] then ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \ -${SECRET_PEM} root@${new_node} "${SERVICE_MAN} ${action} nfs-ganesha" +${SECRET_PEM} root@"${new_node}" "${SERVICE_MAN} ${action} nfs-ganesha" else ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i \ -${SECRET_PEM} root@${new_node} "${SERVICE_MAN} nfs-ganesha ${action}" +${SECRET_PEM} root@"${new_node}" "${SERVICE_MAN} nfs-ganesha ${action}" fi } @@ -161,7 +161,7 @@ determine_servers() local tmp_ifs=${IFS} local ha_servers="" - if [ "${cmd}X" != "setupX" -a "${cmd}X" != "statusX" ]; then + if [ "${cmd}X" != "setupX" ] && [ "${cmd}X" != "statusX" ]; then ha_servers=$(pcs status | grep "Online:" | grep -o '\[.*\]' | sed -e 's/\[//' | sed -e 's/\]//') IFS=$' ' for server in ${ha_servers} ; do @@ -283,16 +283,16 @@ refresh_config () local HA_CONFDIR=${2} local short_host=$(hostname -s) - local export_id=$(grep ^[[:space:]]*Export_Id $HA_CONFDIR/exports/export.$VOL.conf |\ - awk -F"[=,;]" '{print $2}' | tr -d '[[:space:]]') + local export_id=$(grep -E '^[[:space:]]*Export_Id' "${HA_CONFDIR}/exports/export.${VOL}.conf" |\ + awk -F"[=,;]" '{print $2}' | tr -d '[:space:]') if [ -e ${SECRET_PEM} ]; then while [[ ${3} ]]; do - current_host=`echo ${3} | cut -d "." -f 1` - if [[ ${short_host} != ${current_host} ]]; then + current_host=$(echo "${3}" | cut -d "." -f 1) + if [[ ${short_host} != "${current_host}" ]]; then output=$(ssh -oPasswordAuthentication=no \ --oStrictHostKeyChecking=no -i ${SECRET_PEM} root@${current_host} \ +-oStrictHostKeyChecking=no -i "${SECRET_PEM}" root@"${current_host}" \ "dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ string:$HA_CONFDIR/exports/export.$VOL.conf \ @@ -316,7 +316,7 @@ string:\"EXPORT(Export_Id=$export_id)\" 2>&1") # Run the same command on the localhost, output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.UpdateExport \ -string:$HA_CONFDIR/exports/export.$VOL.conf \ +string:"${HA_CONFDIR}/exports/export.${VOL}.conf" \ string:"EXPORT(Export_Id=$export_id)" 2>&1) ret=$? logger <<< "${output}" @@ -336,12 +336,12 @@ teardown_cluster() if [[ ${HA_CLUSTER_NODES} != *${server}* ]]; then logger "info: ${server} is not in config, removing" - pcs cluster stop ${server} --force + pcs cluster stop "${server}" --force if [ $? -ne 0 ]; then logger "warning: pcs cluster stop ${server} failed" fi - pcs cluster node remove ${server} + pcs cluster node remove "${server}" if [ $? -ne 0 ]; then logger "warning: pcs cluster node remove ${server} failed" fi @@ -374,7 +374,7 @@ cleanup_ganesha_config () rm -f /etc/corosync/corosync.conf rm -rf /etc/cluster/cluster.conf* rm -rf /var/lib/pacemaker/cib/* - sed -r -i -e '/^%include[[:space:]]+".+\.conf"$/d' $HA_CONFDIR/ganesha.conf + sed -r -i -e '/^%include[[:space:]]+".+\.conf"$/d' "${HA_CONFDIR}/ganesha.conf" } do_create_virt_ip_constraints() @@ -385,7 +385,7 @@ do_create_virt_ip_constraints() # first a constraint location rule that says the VIP must be where # there's a ganesha.nfsd running - pcs -f ${cibfile} constraint location ${primary}-group rule score=-INFINITY ganesha-active ne 1 + pcs -f "${cibfile}" constraint location ${primary}-group rule score=-INFINITY ganesha-active ne 1 if [ $? -ne 0 ]; then logger "warning: pcs constraint location ${primary}-group rule score=-INFINITY ganesha-active ne 1 failed" fi @@ -393,7 +393,7 @@ do_create_virt_ip_constraints() # then a set of constraint location prefers to set the prefered order # for where a VIP should move while [[ ${1} ]]; do - pcs -f ${cibfile} constraint location ${primary}-group prefers ${1}=${weight} + pcs -f "${cibfile}" constraint location "${primary}"-group prefers ${1}=${weight} if [ $? -ne 0 ]; then logger "warning: pcs constraint location ${primary}-group prefers ${1}=${weight} failed" fi @@ -405,7 +405,7 @@ do_create_virt_ip_constraints() # on Fedora setting appears to be additive, so to get the desired # value we adjust the weight # weight=$(expr ${weight} - 100) - pcs -f ${cibfile} constraint location ${primary}-group prefers ${primary}=${weight} + pcs -f "${cibfile}" constraint location "${primary}"-group prefers ${primary}=${weight} if [ $? -ne 0 ]; then logger "warning: pcs constraint location ${primary}-group prefers ${primary}=${weight} failed" fi @@ -423,7 +423,7 @@ wrap_create_virt_ip_constraints() # the result is "node2 node3 node4"; for node2, "node3 node4 node1" # and so on. while [[ ${1} ]]; do - if [[ ${1} == ${primary} ]]; then + if [[ ${1} == "${primary}" ]]; then shift while [[ ${1} ]]; do tail=${tail}" "${1} @@ -434,7 +434,7 @@ wrap_create_virt_ip_constraints() fi shift done - do_create_virt_ip_constraints ${cibfile} ${primary} ${tail} ${head} + do_create_virt_ip_constraints "${cibfile}" "${primary}" "${tail}" "${head}" } @@ -443,7 +443,7 @@ create_virt_ip_constraints() local cibfile=${1}; shift while [[ ${1} ]]; do - wrap_create_virt_ip_constraints ${cibfile} ${1} ${HA_SERVERS} + wrap_create_virt_ip_constraints "${cibfile}" "${1}" "${HA_SERVERS}" shift done } @@ -480,7 +480,7 @@ setup_create_resources() logger "warning: pcs constraint location nfs-grace-clone rule score=-INFINITY grace-active ne 1" fi - pcs cluster cib ${cibfile} + pcs cluster cib "${cibfile}" while [[ ${1} ]]; do @@ -496,32 +496,32 @@ setup_create_resources() # to give us ipaddr="10.7.6.5". whew! name="VIP_${1}" clean_name=${name//[-.]/_} - nvs=$(grep "^${name}=" ${HA_CONFDIR}/ganesha-ha.conf) + nvs=$(grep "^${name}=" "${HA_CONFDIR}"/ganesha-ha.conf) clean_nvs=${nvs//[-.]/_} eval ${clean_nvs} eval tmp_ipaddr=\$${clean_name} ipaddr=${tmp_ipaddr//_/.} - pcs -f ${cibfile} resource create ${1}-nfs_block ocf:heartbeat:portblock protocol=tcp \ - portno=2049 action=block ip=${ipaddr} --group ${1}-group + pcs -f "${cibfile}" resource create "${1}"-nfs_block ocf:heartbeat:portblock protocol=tcp \ + portno=2049 action=block ip=${ipaddr} --group "${1}"-group if [ $? -ne 0 ]; then logger "warning pcs resource create ${1}-nfs_block failed" fi - pcs -f ${cibfile} resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} \ - cidr_netmask=32 op monitor interval=15s --group ${1}-group --after ${1}-nfs_block + pcs -f "${cibfile}" resource create "${1}"-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} \ + cidr_netmask=32 op monitor interval=15s --group "${1}"-group --after "${1}"-nfs_block if [ $? -ne 0 ]; then logger "warning pcs resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} \ cidr_netmask=32 op monitor interval=15s failed" fi - pcs -f ${cibfile} constraint order nfs-grace-clone then ${1}-cluster_ip-1 + pcs -f "${cibfile}" constraint order nfs-grace-clone then "${1}"-cluster_ip-1 if [ $? -ne 0 ]; then logger "warning: pcs constraint order nfs-grace-clone then ${1}-cluster_ip-1 failed" fi - pcs -f ${cibfile} resource create ${1}-nfs_unblock ocf:heartbeat:portblock protocol=tcp \ - portno=2049 action=unblock ip=${ipaddr} reset_local_on_unblock_stop=true \ - tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${1}-group --after ${1}-cluster_ip-1 \ + pcs -f "${cibfile}" resource create "${1}"-nfs_unblock ocf:heartbeat:portblock protocol=tcp \ + portno=2049 action=unblock ip="${ipaddr}" reset_local_on_unblock_stop=true \ + tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group "${1}"-group --after "${1}"-cluster_ip-1 \ op stop timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op start timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} \ op monitor interval=10s timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} if [ $? -ne 0 ]; then @@ -532,13 +532,13 @@ setup_create_resources() shift done - create_virt_ip_constraints ${cibfile} ${HA_SERVERS} + create_virt_ip_constraints "${cibfile}" "${HA_SERVERS}" - pcs cluster cib-push ${cibfile} + pcs cluster cib-push "${cibfile}" if [ $? -ne 0 ]; then logger "warning pcs cluster cib-push ${cibfile} failed" fi - rm -f ${cibfile} + rm -f "${cibfile}" } @@ -567,7 +567,7 @@ teardown_resources() fi while [[ ${1} ]]; do - pcs resource delete ${1}-group + pcs resource delete "${1}"-group if [ $? -ne 0 ]; then logger "warning: pcs resource delete ${1}-group failed" fi @@ -586,32 +586,32 @@ recreate_resources() # see the comment on the same a few lines up name="VIP_${1}" clean_name=${name//[-.]/_} - nvs=$(grep "^${name}=" ${HA_CONFDIR}/ganesha-ha.conf) + nvs=$(grep "^${name}=" "${HA_CONFDIR}"/ganesha-ha.conf) clean_nvs=${nvs//[-.]/_} - eval ${clean_nvs} + eval "${clean_nvs}" eval tmp_ipaddr=\$${clean_name} ipaddr=${tmp_ipaddr//_/.} - pcs -f ${cibfile} resource create ${1}-nfs_block ocf:heartbeat:portblock protocol=tcp \ - portno=2049 action=block ip=${ipaddr} --group ${1}-group + pcs -f "${cibfile}" resource create "${1}"-nfs_block ocf:heartbeat:portblock protocol=tcp \ + portno=2049 action=block ip="${ipaddr}" --group "${1}"-group if [ $? -ne 0 ]; then - logger "warning pcs resource create ${1}-nfs_block failed" + logger "warning pcs resource create "${1}"-nfs_block failed" fi - pcs -f ${cibfile} resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} \ - cidr_netmask=32 op monitor interval=15s --group ${1}-group --after ${1}-nfs_block + pcs -f "${cibfile}" resource create "${1}"-cluster_ip-1 ocf:heartbeat:IPaddr ip="${ipaddr}" \ + cidr_netmask=32 op monitor interval=15s --group "${1}"-group --after "${1}"-nfs_block if [ $? -ne 0 ]; then logger "warning pcs resource create ${1}-cluster_ip-1 ocf:heartbeat:IPaddr ip=${ipaddr} \ cidr_netmask=32 op monitor interval=15s failed" fi - pcs -f ${cibfile} constraint order nfs-grace-clone then ${1}-cluster_ip-1 + pcs -f "${cibfile}" constraint order nfs-grace-clone then "${1}"-cluster_ip-1 if [ $? -ne 0 ]; then logger "warning: pcs constraint order nfs-grace-clone then ${1}-cluster_ip-1 failed" fi - pcs -f ${cibfile} resource create ${1}-nfs_unblock ocf:heartbeat:portblock protocol=tcp \ - portno=2049 action=unblock ip=${ipaddr} reset_local_on_unblock_stop=true \ - tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${1}-group --after ${1}-cluster_ip-1 \ + pcs -f "${cibfile}" resource create "${1}"-nfs_unblock ocf:heartbeat:portblock protocol=tcp \ + portno=2049 action=unblock ip="${ipaddr}" reset_local_on_unblock_stop=true \ + tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group "${1}"-group --after "${1}"-cluster_ip-1 \ op stop timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op start timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} \ op monitor interval=10s timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} if [ $? -ne 0 ]; then @@ -629,28 +629,28 @@ addnode_recreate_resources() local add_node=${1}; shift local add_vip=${1}; shift - recreate_resources ${cibfile} ${HA_SERVERS} + recreate_resources "${cibfile}" "${HA_SERVERS}" - pcs -f ${cibfile} resource create ${add_node}-nfs_block ocf:heartbeat:portblock \ - protocol=tcp portno=2049 action=block ip=${add_vip} --group ${add_node}-group + pcs -f "${cibfile}" resource create "${add_node}"-nfs_block ocf:heartbeat:portblock \ + protocol=tcp portno=2049 action=block ip="${add_vip}" --group "${add_node}"-group if [ $? -ne 0 ]; then logger "warning pcs resource create ${add_node}-nfs_block failed" fi - pcs -f ${cibfile} resource create ${add_node}-cluster_ip-1 ocf:heartbeat:IPaddr \ - ip=${add_vip} cidr_netmask=32 op monitor interval=15s --group ${add_node}-group \ - --after ${add_node}-nfs_block + pcs -f "${cibfile}" resource create "${add_node}"-cluster_ip-1 ocf:heartbeat:IPaddr \ + ip="${add_vip}" cidr_netmask=32 op monitor interval=15s --group "${add_node}"-group \ + --after "${add_node}"-nfs_block if [ $? -ne 0 ]; then logger "warning pcs resource create ${add_node}-cluster_ip-1 ocf:heartbeat:IPaddr \ ip=${add_vip} cidr_netmask=32 op monitor interval=15s failed" fi - pcs -f ${cibfile} constraint order nfs-grace-clone then ${add_node}-cluster_ip-1 + pcs -f "${cibfile}" constraint order nfs-grace-clone then "${add_node}"-cluster_ip-1 if [ $? -ne 0 ]; then logger "warning: pcs constraint order nfs-grace-clone then ${add_node}-cluster_ip-1 failed" fi - pcs -f ${cibfile} resource create ${add_node}-nfs_unblock ocf:heartbeat:portblock \ + pcs -f "${cibfile}" resource create ${add_node}-nfs_unblock ocf:heartbeat:portblock \ protocol=tcp portno=2049 action=unblock ip=${add_vip} reset_local_on_unblock_stop=true \ - tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group ${add_node}-group --after \ + tickle_dir=${HA_VOL_MNT}/nfs-ganesha/tickle_dir/ --group "${add_node}"-group --after \ ${add_node}-cluster_ip-1 op stop timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op start \ timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} op monitor interval=10s \ timeout=${PORTBLOCK_UNBLOCK_TIMEOUT} @@ -665,7 +665,7 @@ clear_resources() local cibfile=${1}; shift while [[ ${1} ]]; do - pcs -f ${cibfile} resource delete ${1}-group + pcs -f "${cibfile}" resource delete "${1}"-group if [ $? -ne 0 ]; then logger "warning: pcs -f ${cibfile} resource delete ${1}-group" fi @@ -682,7 +682,7 @@ addnode_create_resources() local cibfile=$(mktemp -u) # start HA on the new node - pcs cluster start ${add_node} + pcs cluster start "${add_node}" if [ $? -ne 0 ]; then logger "warning: pcs cluster start ${add_node} failed" fi @@ -695,27 +695,27 @@ addnode_create_resources() # delete all the -cluster_ip-1 resources, clearing # their constraints, then create them again so we can # recompute their constraints - clear_resources ${cibfile} ${HA_SERVERS} - addnode_recreate_resources ${cibfile} ${add_node} ${add_vip} + clear_resources "${cibfile}" "${HA_SERVERS}" + addnode_recreate_resources "${cibfile}" "${add_node}" "${add_vip}" - HA_SERVERS="${HA_SERVERS} ${add_node}" - create_virt_ip_constraints ${cibfile} ${HA_SERVERS} + HA_SERVERS="${HA_SERVERS}" "${add_node}" + create_virt_ip_constraints "${cibfile}" "${HA_SERVERS}" - pcs cluster cib-push ${cibfile} + pcs cluster cib-push "${cibfile}" if [ $? -ne 0 ]; then logger "warning: pcs cluster cib-push ${cibfile} failed" fi - rm -f ${cibfile} + rm -f "${cibfile}" } deletenode_delete_resources() { local node=${1}; shift - local ha_servers=$(echo "${HA_SERVERS}" | sed s/${node}//) + local ha_servers=$(echo "${HA_SERVERS}" | sed "s/${node}//") local cibfile=$(mktemp -u) - pcs cluster cib ${cibfile} + pcs cluster cib "${cibfile}" if [ $? -ne 0 ]; then logger "warning: pcs cluster cib ${cibfile} failed" fi @@ -723,17 +723,17 @@ deletenode_delete_resources() # delete all the -cluster_ip-1 and -trigger_ip-1 resources, # clearing their constraints, then create them again so we can # recompute their constraints - clear_resources ${cibfile} ${HA_SERVERS} - recreate_resources ${cibfile} ${ha_servers} + clear_resources "${cibfile}" "${HA_SERVERS}" + recreate_resources "${cibfile}" "${ha_servers}" HA_SERVERS=$(echo "${ha_servers}" | sed -e "s/ / /") - create_virt_ip_constraints ${cibfile} ${HA_SERVERS} + create_virt_ip_constraints "${cibfile}" "${HA_SERVERS}" - pcs cluster cib-push ${cibfile} + pcs cluster cib-push "${cibfile}" if [ $? -ne 0 ]; then logger "warning: pcs cluster cib-push ${cibfile} failed" fi - rm -f ${cibfile} + rm -f "${cibfile}" } @@ -743,8 +743,8 @@ deletenode_update_haconfig() local name="VIP_${1}" local clean_name=${name//[-.]/_} - ha_servers=$(echo ${HA_SERVERS} | sed -e "s/ /,/") - sed -i -e "s/^HA_CLUSTER_NODES=.*$/HA_CLUSTER_NODES=\"${ha_servers// /,}\"/" -e "s/^${name}=.*$//" -e "/^$/d" ${HA_CONFDIR}/ganesha-ha.conf + ha_servers=$(echo "${HA_SERVERS}" | sed -e "s/ /,/") + sed -i -e "s/^HA_CLUSTER_NODES=.*$/HA_CLUSTER_NODES=\"${ha_servers// /,}\"/" -e "s/^${name}=.*$//" -e "/^$/d" "${HA_CONFDIR}/ganesha-ha.conf" } @@ -767,47 +767,47 @@ setup_state_volume() dirname=${1}${dname} fi - if [ ! -d ${mnt}/nfs-ganesha/tickle_dir ]; then - mkdir ${mnt}/nfs-ganesha/tickle_dir + if [ ! -d "${mnt}/nfs-ganesha/tickle_dir" ]; then + mkdir "${mnt}/nfs-ganesha/tickle_dir" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname} ]; then - mkdir ${mnt}/nfs-ganesha/${dirname} + if [ ! -d "${mnt}/nfs-ganesha/${dirname}" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd" fi - if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then - touch ${mnt}/nfs-ganesha/${dirname}/nfs/state - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/state + if [ ! -e "${mnt}/nfs-ganesha/${dirname}/nfs/state" ]; then + touch "${mnt}/nfs-ganesha/${dirname}/nfs/state" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/state" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" fi - if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then - touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state + if [ ! -e "${mnt}/nfs-ganesha/${dirname}/nfs/statd/state" ]; then + touch "${mnt}/nfs-ganesha/${dirname}/nfs/statd/state" fi for server in ${HA_SERVERS} ; do - if [[ ${server} != ${dirname} ]]; then - ln -s ${mnt}/nfs-ganesha/${server}/nfs/ganesha ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/${server} - ln -s ${mnt}/nfs-ganesha/${server}/nfs/statd ${mnt}/nfs-ganesha/${dirname}/nfs/statd/${server} + if [[ ${server} != "${dirname}" ]]; then + ln -s "${mnt}/nfs-ganesha/${server}/nfs/ganesha" "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/${server}" + ln -s "${mnt}/nfs-ganesha/${server}/nfs/statd" "${mnt}/nfs-ganesha/${dirname}/nfs/statd/${server}" fi done shift @@ -848,49 +848,49 @@ addnode_state_volume() dirname=${newnode}${dname} fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname} ]; then - mkdir ${mnt}/nfs-ganesha/${dirname} + if [ ! -d "${mnt}/nfs-ganesha/${dirname}" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd" fi - if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then - touch ${mnt}/nfs-ganesha/${dirname}/nfs/state - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/state + if [ ! -e "${mnt}/nfs-ganesha/${dirname}/nfs/state" ]; then + touch "${mnt}/nfs-ganesha/${dirname}/nfs/state" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/state" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4old" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm" fi - if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then - mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak - chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak + if [ ! -d "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" ]; then + mkdir "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" + chown rpcuser:rpcuser "${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak" fi - if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then - touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state + if [ ! -e "${mnt}/nfs-ganesha/${dirname}/nfs/statd/state" ]; then + touch "${mnt}/nfs-ganesha/${dirname}/nfs/statd/state" fi for server in ${HA_SERVERS} ; do - if [[ ${server} != ${dirname} ]]; then - ln -s ${mnt}/nfs-ganesha/${server}/nfs/ganesha ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/${server} - ln -s ${mnt}/nfs-ganesha/${server}/nfs/statd ${mnt}/nfs-ganesha/${dirname}/nfs/statd/${server} + if [[ "${server}" != "${dirname}" ]]; then + ln -s "${mnt}/nfs-ganesha/${server}/nfs/ganesha" "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/${server}" + ln -s "${mnt}/nfs-ganesha/${server}/nfs/statd" "${mnt}/nfs-ganesha/${dirname}/nfs/statd/${server}" - ln -s ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha ${mnt}/nfs-ganesha/${server}/nfs/ganesha/${dirname} - ln -s ${mnt}/nfs-ganesha/${dirname}/nfs/statd ${mnt}/nfs-ganesha/${server}/nfs/statd/${dirname} + ln -s "${mnt}/nfs-ganesha/${dirname}/nfs/ganesha" "${mnt}/nfs-ganesha/${server}/nfs/ganesha/${dirname}" + ln -s "${mnt}/nfs-ganesha/${dirname}/nfs/statd" "${mnt}/nfs-ganesha/${server}/nfs/statd/${dirname}" fi done @@ -914,12 +914,12 @@ delnode_state_volume() dirname=${delnode}${dname} fi - rm -rf ${mnt}/nfs-ganesha/${dirname} + rm -rf "${mnt}/nfs-ganesha/${dirname}" for server in ${HA_SERVERS} ; do - if [[ ${server} != ${dirname} ]]; then - rm -f ${mnt}/nfs-ganesha/${server}/nfs/ganesha/${dirname} - rm -f ${mnt}/nfs-ganesha/${server}/nfs/statd/${dirname} + if [[ ${server} != "${dirname}" ]]; then + rm -f "${mnt}/nfs-ganesha/${server}/nfs/ganesha/${dirname}" + rm -f "${mnt}/nfs-ganesha/${server}/nfs/statd/${dirname}" fi done } @@ -935,7 +935,7 @@ status() # change tabs to spaces, strip leading spaces, including any # new '*' at the beginning of a line introduced in pcs-0.10.x - pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*\*//" -e "s/^[ ]*//" > ${scratch} + pcs status | sed -e "s/\t/ /g" -e "s/^[ ]*\*//" -e "s/^[ ]*//" > "${scratch}" nodes[0]=${1}; shift @@ -950,7 +950,7 @@ status() done # print the nodes that are expected to be online - grep -E "Online:" ${scratch} + grep -E "Online:" "${scratch}" echo @@ -962,18 +962,18 @@ status() # check if the VIP and port block/unblock RAs are on the expected nodes for n in ${nodes[*]}; do - grep -E -x "${n}-nfs_block +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 ${scratch} + grep -E -x "${n}-nfs_block +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 "${scratch}" result=$? ((healthy+=${result})) - grep -E -x "${n}-cluster_ip-1 +\(ocf::heartbeat:IPaddr\): +Started ${n}" > /dev/null 2>&1 ${scratch} + grep -E -x "${n}-cluster_ip-1 +\(ocf::heartbeat:IPaddr\): +Started ${n}" > /dev/null 2>&1 "${scratch}" result=$? ((healthy+=${result})) - grep -E -x "${n}-nfs_unblock +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 ${scratch} + grep -E -x "${n}-nfs_unblock +\(ocf::heartbeat:portblock\): +Started ${n}" > /dev/null 2>&1 "${scratch}" result=$? ((healthy+=${result})) done - grep -E "\): +Stopped|FAILED" > /dev/null 2>&1 ${scratch} + grep -E "\): +Stopped|FAILED" > /dev/null 2>&1 "${scratch}" result=$? if [ ${result} -eq 0 ]; then @@ -984,16 +984,16 @@ status() echo "Cluster HA Status: FAILOVER" fi - rm -f ${scratch} + rm -f "${scratch}" } create_ganesha_conf_file() { if [[ "$1" == "yes" ]]; then - if [ -e $GANESHA_CONF ]; + if [ -e "${GANESHA_CONF}" ]; then - rm -rf $GANESHA_CONF + rm -rf "${GANESHA_CONF}" fi # The symlink /etc/ganesha/ganesha.conf need to be # created using ganesha conf file mentioned in the @@ -1002,12 +1002,12 @@ create_ganesha_conf_file() # so that ganesha conf editing of ganesha conf will # be easy as well as it become more consistent. - ln -s $HA_CONFDIR/ganesha.conf $GANESHA_CONF + ln -s "${HA_CONFDIR}/ganesha.conf" "${GANESHA_CONF}" else # Restoring previous file - rm -rf $GANESHA_CONF - cp $HA_CONFDIR/ganesha.conf $GANESHA_CONF - sed -r -i -e '/^%include[[:space:]]+".+\.conf"$/d' $GANESHA_CONF + rm -rf "${GANESHA_CONF}" + cp "${HA_CONFDIR}/ganesha.conf" "${GANESHA_CONF}" + sed -r -i -e '/^%include[[:space:]]+".+\.conf"$/d' "${GANESHA_CONF}" fi } @@ -1016,7 +1016,7 @@ set_quorum_policy() local quorum_policy="stop" local num_servers=${1} - if [ ${num_servers} -lt 3 ]; then + if [ "${num_servers}" -lt 3 ]; then quorum_policy="ignore" fi pcs property set no-quorum-policy=${quorum_policy} @@ -1075,9 +1075,10 @@ main() fi fi # pacemaker 2.1.0 changed --timeout=value - echo ${crmadmin_vers} - crmadmin_vers=`crmadmin --version | grep -o "[12]\.[0-9]\.." | cut -c 1-3` - if [[ "${crmadmin_vers}" > "2.0" ]]; then + echo "${crmadmin_vers}" + crmadmin_vers=$(crmadmin --version | grep -o "[12]\.[0-9]\.." | cut -c 1-3) + # bc returns 0=false, 1=true + if [[ 0 -ne $( echo "${crmadmin_vers} > 2.0" | bc ) ]]; then CRMADM_TIMEOUT_OPTION="5sec" fi @@ -1085,15 +1086,15 @@ main() determine_service_manager - setup_cluster ${HA_NAME} ${HA_NUM_SERVERS} "${HA_SERVERS}" + setup_cluster "${HA_NAME}" "${HA_NUM_SERVERS}" "${HA_SERVERS}" - setup_create_resources ${HA_SERVERS} + setup_create_resources "${HA_SERVERS}" setup_finalize_ha - setup_state_volume ${HA_SERVERS} + setup_state_volume "${HA_SERVERS}" - enable_pacemaker ${HA_SERVERS} + enable_pacemaker "${HA_SERVERS}" else @@ -1106,15 +1107,15 @@ main() determine_servers "teardown" - teardown_resources ${HA_SERVERS} + teardown_resources "${HA_SERVERS}" - teardown_cluster ${HA_NAME} + teardown_cluster "${HA_NAME}" - cleanup_ganesha_config ${HA_CONFDIR} + cleanup_ganesha_config "${HA_CONFDIR}" ;; cleanup | --cleanup) - cleanup_ganesha_config ${HA_CONFDIR} + cleanup_ganesha_config "${HA_CONFDIR}" ;; add | --add) @@ -1125,36 +1126,36 @@ main() determine_service_manager - manage_service "start" ${node} + manage_service "start" "${node}" determine_servers "add" - pcs cluster node add ${node} + pcs cluster node add "${node}" if [ $? -ne 0 ]; then logger "warning: pcs cluster node add ${node} failed" fi - addnode_create_resources ${node} ${vip} + addnode_create_resources "${node}" "${vip}" # Subsequent add-node recreates resources for all the nodes # that already exist in the cluster. The nodes are picked up # from the entries in the ganesha-ha.conf file. Adding the # newly added node to the file so that the resources specfic # to this node is correctly recreated in the future. clean_node=${node//[-.]/_} - echo "VIP_${node}=\"${vip}\"" >> ${HA_CONFDIR}/ganesha-ha.conf + echo "VIP_${node}=\"${vip}\"" >> "${HA_CONFDIR}/ganesha-ha.conf" NEW_NODES="$HA_CLUSTER_NODES,${node}" sed -i s/HA_CLUSTER_NODES.*/"HA_CLUSTER_NODES=\"$NEW_NODES\""/ \ -$HA_CONFDIR/ganesha-ha.conf +"$HA_CONFDIR/ganesha-ha.conf" - addnode_state_volume ${node} + addnode_state_volume "${node}" # addnode_create_resources() already appended ${node} to # HA_SERVERS, so only need to increment HA_NUM_SERVERS # and set quorum policy - HA_NUM_SERVERS=$(expr ${HA_NUM_SERVERS} + 1) - set_quorum_policy ${HA_NUM_SERVERS} + HA_NUM_SERVERS=$(expr "${HA_NUM_SERVERS}" + 1) + set_quorum_policy "${HA_NUM_SERVERS}" ;; delete | --delete) @@ -1164,29 +1165,29 @@ $HA_CONFDIR/ganesha-ha.conf determine_servers "delete" - deletenode_delete_resources ${node} + deletenode_delete_resources "${node}" - pcs cluster node remove ${node} + pcs cluster node remove "${node}" if [ $? -ne 0 ]; then logger "warning: pcs cluster node remove ${node} failed" fi - deletenode_update_haconfig ${node} + deletenode_update_haconfig "${node}" - delnode_state_volume ${node} + delnode_state_volume "${node}" determine_service_manager - manage_service "stop" ${node} + manage_service "stop" "${node}" - HA_NUM_SERVERS=$(expr ${HA_NUM_SERVERS} - 1) - set_quorum_policy ${HA_NUM_SERVERS} + HA_NUM_SERVERS=$(expr "${HA_NUM_SERVERS}" - 1) + set_quorum_policy "${HA_NUM_SERVERS}" ;; status | --status) determine_servers "status" - status ${HA_SERVERS} + status "${HA_SERVERS}" ;; refresh-config | --refresh-config) @@ -1194,12 +1195,12 @@ $HA_CONFDIR/ganesha-ha.conf determine_servers "refresh-config" - refresh_config ${VOL} ${HA_CONFDIR} ${HA_SERVERS} + refresh_config "${VOL}" "${HA_CONFDIR}" "${HA_SERVERS}" ;; setup-ganesha-conf-files | --setup-ganesha-conf-files) - create_ganesha_conf_file ${1} + create_ganesha_conf_file "$1" ;; *) diff --git a/extras/geo-rep/generate-gfid-file.sh b/extras/geo-rep/generate-gfid-file.sh index 36c08c25e0d..1d9dac8cc76 100644 --- a/extras/geo-rep/generate-gfid-file.sh +++ b/extras/geo-rep/generate-gfid-file.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Usage: generate-gfid-file.sh [dirs-list-file] function get_gfids() diff --git a/extras/geo-rep/get-gfid.sh b/extras/geo-rep/get-gfid.sh index a4d609b0bc5..5014bdff5ca 100755 --- a/extras/geo-rep/get-gfid.sh +++ b/extras/geo-rep/get-gfid.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ATTR_STR=`getfattr -h $1 -n glusterfs.gfid.string` GLFS_PATH=`echo $ATTR_STR | sed -e 's/# file: \(.*\) glusterfs.gfid.string*/\1/g'` diff --git a/extras/geo-rep/gsync-upgrade.sh b/extras/geo-rep/gsync-upgrade.sh index ede999b94d1..3e757c71208 100644 --- a/extras/geo-rep/gsync-upgrade.sh +++ b/extras/geo-rep/gsync-upgrade.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #usage: gsync-upgrade.sh # #: a machine on which gluster cli can fetch secondary volume info. diff --git a/extras/geo-rep/secondary-upgrade.sh b/extras/geo-rep/secondary-upgrade.sh index 71175e4eaf8..5740fbee9b0 100644 --- a/extras/geo-rep/secondary-upgrade.sh +++ b/extras/geo-rep/secondary-upgrade.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #usage: secondary-upgrade.sh # #: a machine on which gluster cli can fetch secondary volume info. diff --git a/extras/gfid-to-dirname.sh b/extras/gfid-to-dirname.sh index fd359fab58a..e938a7bf859 100755 --- a/extras/gfid-to-dirname.sh +++ b/extras/gfid-to-dirname.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function read_symlink() { diff --git a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh index b028135a1bc..ba6dec7d3eb 100644 --- a/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh +++ b/extras/hook-scripts/S56glusterd-geo-rep-create-post.sh @@ -1,24 +1,24 @@ -#!/bin/bash +#!/usr/bin/env bash #key_val_pair is the arguments passed to the script in the form of #key value pair -// clang-format off +# clang-format off -key_val_pair1=`echo $2 | cut -d ',' -f 1` -key_val_pair2=`echo $2 | cut -d ',' -f 2` -key_val_pair3=`echo $2 | cut -d ',' -f 3` -key_val_pair4=`echo $2 | cut -d ',' -f 4` -key_val_pair5=`echo $2 | cut -d ',' -f 5` -key_val_pair6=`echo $2 | cut -d ',' -f 6` +key_val_pair1=$(echo "$2" | cut -d ',' -f 1) +key_val_pair2=$(echo "$2" | cut -d ',' -f 2) +key_val_pair3=$(echo "$2" | cut -d ',' -f 3) +key_val_pair4=$(echo "$2" | cut -d ',' -f 4) +key_val_pair5=$(echo "$2" | cut -d ',' -f 5) +key_val_pair6=$(echo "$2" | cut -d ',' -f 6) -primaryvol=`echo $1 | cut -d '=' -f 2` +primaryvol=$(echo "$1" | cut -d '=' -f 2) if [ "$primaryvol" == "" ]; then exit; fi -key=`echo $key_val_pair1 | cut -d '=' -f 1` -val=`echo $key_val_pair1 | cut -d '=' -f 2` +key=$(echo "$key_val_pair1" | cut -d '=' -f 1) +val=$(echo "$key_val_pair1" | cut -d '=' -f 2) if [ "$key" != "is_push_pem" ]; then exit; fi @@ -26,8 +26,8 @@ if [ "$val" != '1' ]; then exit; fi -key=`echo $key_val_pair2 | cut -d '=' -f 1` -val=`echo $key_val_pair2 | cut -d '=' -f 2` +key=$(echo "$key_val_pair2" | cut -d '=' -f 1) +val=$(echo "$key_val_pair2" | cut -d '=' -f 2) if [ "$key" != "pub_file" ]; then exit; fi @@ -35,72 +35,72 @@ if [ "$val" == "" ]; then exit; fi -pub_file=`echo $val` -pub_file_bname="$(basename $pub_file)" -pub_file_dname="$(dirname $pub_file)" -pub_file_tmp=`echo $val`_tmp +pub_file="$(echo "${val}")" +pub_file_bname="$(basename "${pub_file}")" +pub_file_dname="$(dirname "${pub_file}")" +pub_file_tmp="$(echo "${val}")_tmp" -key=`echo $key_val_pair3 | cut -d '=' -f 1` -val=`echo $key_val_pair3 | cut -d '=' -f 2` -if [ "$key" != "secondary_user" ]; then +key="$(echo "${key_val_pair3}" | cut -d '=' -f 1)" +val="$(echo "${key_val_pair3}" | cut -d '=' -f 2)" +if [ "${key}" != "secondary_user" ]; then exit; fi -if [ "$val" == "" ]; then +if [ "{$val}" == "" ]; then exit; fi -secondary_user=`echo $val` +secondary_user="$(echo "${val}")" -key=`echo $key_val_pair4 | cut -d '=' -f 1` -val=`echo $key_val_pair4 | cut -d '=' -f 2` +key="$(echo "${key_val_pair4}" | cut -d '=' -f 1)" +val="$(echo "${key_val_pair4}" | cut -d '=' -f 2)" if [ "$key" != "secondary_ip" ]; then exit; fi if [ "$val" == "" ]; then exit; fi -secondary_ip=`echo $val` +secondary_ip="$(echo "${val}")" -key=`echo $key_val_pair5 | cut -d '=' -f 1` -val=`echo $key_val_pair5 | cut -d '=' -f 2` -if [ "$key" != "secondary_vol" ]; then +key="$(echo "${key_val_pair5}" | cut -d '=' -f 1)" +val="$(echo "${key_val_pair5}" | cut -d '=' -f 2)" +if [ "${key}" != "secondary_vol" ]; then exit; fi -if [ "$val" == "" ]; then +if [ "${val}" == "" ]; then exit; fi -secondaryvol=`echo $val` +secondaryvol="$(echo "${val}")" -key=`echo $key_val_pair6 | cut -d '=' -f 1` -val=`echo $key_val_pair6 | cut -d '=' -f 2` +key="$(echo "${key_val_pair6}" | cut -d '=' -f 1)" +val="$(echo "${key_val_pair6}" | cut -d '=' -f 2)" if [ "$key" != "ssh_port" ]; then exit; fi if [ "$val" == "" ]; then exit; fi -SSH_PORT=`echo $val` +SSH_PORT="$(echo "${val}")" SSH_OPT="-oPasswordAuthentication=no -oStrictHostKeyChecking=no" -if [ -f $pub_file ]; then +if [ -f "${pub_file}" ]; then # For a non-root user copy the pub file to the user's home directory # For a root user copy the pub files to priv_dir->geo-rep. - if [ "$secondary_user" != "root" ]; then - secondary_user_home_dir=`ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_user@$secondary_ip "getent passwd $secondary_user | cut -d ':' -f 6"` - scp -P ${SSH_PORT} ${SSH_OPT} $pub_file $secondary_user@$secondary_ip:$secondary_user_home_dir/common_secret.pem.pub_tmp - ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_user@$secondary_ip "mv $secondary_user_home_dir/common_secret.pem.pub_tmp $secondary_user_home_dir/${primaryvol}_${secondaryvol}_common_secret.pem.pub" + if [ "${secondary_user}" != "root" ]; then + secondary_user_home_dir=$(ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_user}"@"${secondary_ip}" "getent passwd ${secondary_user} | cut -d ':' -f 6") + scp -P "${SSH_PORT}" "${SSH_OPT}" "${pub_file}" "${secondary_user}"@"${secondary_ip}":"${secondary_user}_home_dir/common_secret.pem.pub_tmp" + ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_user}"@"${secondary_ip}" "mv ${secondary_user}_home_dir/common_secret.pem.pub_tmp ${secondary_user}_home_dir/${primaryvol}_${secondaryvol}_common_secret.pem.pub" else if [[ -z "${GR_SSH_IDENTITY_KEY}" ]]; then - scp -P ${SSH_PORT} ${SSH_OPT} $pub_file $secondary_ip:$pub_file_tmp - ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_ip "mv $pub_file_tmp ${pub_file_dname}/${primaryvol}_${secondaryvol}_${pub_file_bname}" - ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_ip "gluster system:: copy file /geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" - ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_ip "gluster system:: execute add_secret_pub root geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" - ssh -p ${SSH_PORT} ${SSH_OPT} $secondary_ip "gluster vol set ${secondaryvol} features.read-only on" + scp -P "${SSH_PORT}" "${SSH_OPT}" "${pub_file}" "${secondary_ip}":"${pub_file}_tmp" + ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_ip}" "mv ${pub_file}_tmp ${pub_file_dname}/${primaryvol}_${secondaryvol}_${pub_file_bname}" + ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_ip}" "gluster system:: copy file /geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" + ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_ip}" "gluster system:: execute add_secret_pub root geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" + ssh -p "${SSH_PORT}" "${SSH_OPT}" "${secondary_ip}" "gluster vol set ${secondaryvol} features.read-only on" else - scp -P ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $pub_file $secondary_ip:$pub_file_tmp - ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $secondary_ip "mv $pub_file_tmp ${pub_file_dname}/${primaryvol}_${secondaryvol}_${pub_file_bname}" - ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $secondary_ip "gluster system:: copy file /geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" - ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $secondary_ip "gluster system:: execute add_secret_pub root geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" - ssh -p ${SSH_PORT} -i ${GR_SSH_IDENTITY_KEY} ${SSH_OPT} $secondary_ip "gluster vol set ${secondaryvol} features.read-only on" + scp -P "${SSH_PORT}" -i "${GR_SSH_IDENTITY_KEY}" "${SSH_OPT}" "${pub_file}" "${secondary_ip}":"${pub_file}_tmp" + ssh -p "${SSH_PORT}" -i "${GR_SSH_IDENTITY_KEY}" "${SSH_OPT}" "${secondary_ip}" "mv ${pub_file}_tmp ${pub_file_dname}/${primaryvol}_${secondaryvol}_${pub_file_bname}" + ssh -p "${SSH_PORT}" -i "${GR_SSH_IDENTITY_KEY}" "${SSH_OPT}" "${secondary_ip}" "gluster system:: copy file /geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" + ssh -p "${SSH_PORT}" -i "${GR_SSH_IDENTITY_KEY}" "${SSH_OPT}" "${secondary_ip}" "gluster system:: execute add_secret_pub root geo-replication/${primaryvol}_${secondaryvol}_common_secret.pem.pub > /dev/null" + ssh -p "${SSH_PORT}" -i "${GR_SSH_IDENTITY_KEY}" "${SSH_OPT}" "${secondary_ip}" "gluster vol set ${secondaryvol} features.read-only on" fi fi fi diff --git a/extras/hook-scripts/add-brick/post/S10selinux-label-brick.sh b/extras/hook-scripts/add-brick/post/S10selinux-label-brick.sh index 4a17c993a77..3686437f64c 100755 --- a/extras/hook-scripts/add-brick/post/S10selinux-label-brick.sh +++ b/extras/hook-scripts/add-brick/post/S10selinux-label-brick.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Install to hooks//add-brick/post # @@ -74,7 +74,7 @@ set_brick_labels() # Add a file context for each brick path in the list and associate with the # glusterd_brick_t SELinux type. - for p in ${list[@]} + for p in "${list[@]}" do semanage fcontext --add -t glusterd_brick_t -r s0 "${p}" done diff --git a/extras/hook-scripts/add-brick/post/S13create-subdir-mounts.sh b/extras/hook-scripts/add-brick/post/S13create-subdir-mounts.sh index 1a6923ee7aa..e35da649a37 100755 --- a/extras/hook-scripts/add-brick/post/S13create-subdir-mounts.sh +++ b/extras/hook-scripts/add-brick/post/S13create-subdir-mounts.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash ##--------------------------------------------------------------------------- ## This script runs the self-heal of the directories which are expected to ## be present as they are mounted as subdirectory mounts. ##--------------------------------------------------------------------------- -MOUNT_DIR=`mktemp -d -t ${0##*/}.XXXXXX`; +MOUNT_DIR=$(mktemp -d -t ${0##*/}.XXXXXX); OPTSPEC="volname:,version:,gd-workdir:,volume-op:" PROGNAME="add-brick-create-subdir" VOL_NAME=test @@ -13,13 +13,13 @@ GLUSTERD_WORKDIR="/var/lib/glusterd" cleanup_mountpoint () { - umount -f $MOUNT_DIR; + umount -f "${MOUNT_DIR}"; if [ 0 -ne $? ] then return $? fi - rmdir $MOUNT_DIR; + rmdir "${MOUNT_DIR}"; if [ 0 -ne $? ] then return $? @@ -29,7 +29,7 @@ cleanup_mountpoint () ##------------------------------------------ ## Parse the arguments ##------------------------------------------ -ARGS=$(getopt -l $OPTSPEC -name $PROGNAME $@) +ARGS=$(getopt -l $OPTSPEC -name $PROGNAME "$@") eval set -- "$ARGS" while true; @@ -58,17 +58,17 @@ do done ## See if we have any subdirs to be healed before going further -subdirs=$(grep 'auth.allow' ${GLUSTERD_WORKDIR}/vols/${VOL_NAME}/info | cut -f2 -d'=' | tr ',' '\n' | cut -f1 -d'('); +subdirs=$(grep 'auth.allow' "${GLUSTERD_WORKDIR}"/vols/"${VOL_NAME}"/info | cut -f2 -d'=' | tr ',' '\n' | cut -f1 -d'('); -if [ -z ${subdirs} ]; then - rmdir $MOUNT_DIR; +if [ -z "${subdirs}" ]; then + rmdir "${MOUNT_DIR}"; exit 0; fi ##---------------------------------------- ## Mount the volume in temp directory. ## ----------------------------------- -glusterfs -s localhost --volfile-id=$VOL_NAME --client-pid=-50 $MOUNT_DIR; +glusterfs -s localhost --volfile-id="${VOL_NAME}" --client-pid=-50 "${MOUNT_DIR}"; if [ 0 -ne $? ] then exit $?; @@ -79,7 +79,7 @@ fi # list from 'auth.allow' option and only stat them. for subdir in ${subdirs} do - stat ${MOUNT_DIR}/${subdir} > /dev/null; + stat "${MOUNT_DIR}"/"${subdir}" > /dev/null; done ## Clean up and exit diff --git a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh index 969d6fcf7f0..f3c342f4d90 100755 --- a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh +++ b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##--------------------------------------------------------------------------- ## This script updates the 'limit-set' xattr on the newly added node. Please diff --git a/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh b/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh index 27e85231f45..afef6de1f3a 100755 --- a/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh +++ b/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ############################################################################### ## ---------------------------------------------------------------------------- diff --git a/extras/hook-scripts/create/post/S10selinux-label-brick.sh b/extras/hook-scripts/create/post/S10selinux-label-brick.sh index f9b4b1a57e3..de3c56c062f 100755 --- a/extras/hook-scripts/create/post/S10selinux-label-brick.sh +++ b/extras/hook-scripts/create/post/S10selinux-label-brick.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Install to hooks//create/post # diff --git a/extras/hook-scripts/delete/pre/S10selinux-del-fcontext.sh b/extras/hook-scripts/delete/pre/S10selinux-del-fcontext.sh index 056b52afe76..f8de5c3fc87 100755 --- a/extras/hook-scripts/delete/pre/S10selinux-del-fcontext.sh +++ b/extras/hook-scripts/delete/pre/S10selinux-del-fcontext.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Install to hooks//delete/pre # diff --git a/extras/hook-scripts/set/post/S30samba-set.sh b/extras/hook-scripts/set/post/S30samba-set.sh index 854f131f6c8..15bddc2f887 100755 --- a/extras/hook-scripts/set/post/S30samba-set.sh +++ b/extras/hook-scripts/set/post/S30samba-set.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Need to be copied to hooks//set/post/ diff --git a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh index ef8f0956d07..d92bc641ab3 100755 --- a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh +++ b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash key=`echo $3 | cut -d '=' -f 1` val=`echo $3 | cut -d '=' -f 2` diff --git a/extras/hook-scripts/set/post/S61simple-quota.sh b/extras/hook-scripts/set/post/S61simple-quota.sh index f586de29168..b2488533ab6 100755 --- a/extras/hook-scripts/set/post/S61simple-quota.sh +++ b/extras/hook-scripts/set/post/S61simple-quota.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Need to be copied to hooks//set/post/ diff --git a/extras/hook-scripts/start/post/S30samba-start.sh b/extras/hook-scripts/start/post/S30samba-start.sh index cac0cbf1464..13949a50010 100755 --- a/extras/hook-scripts/start/post/S30samba-start.sh +++ b/extras/hook-scripts/start/post/S30samba-start.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Need to be copied to hooks//start/post diff --git a/extras/hook-scripts/start/post/S31ganesha-start.sh b/extras/hook-scripts/start/post/S31ganesha-start.sh index de760554f75..40855c6d4d7 100755 --- a/extras/hook-scripts/start/post/S31ganesha-start.sh +++ b/extras/hook-scripts/start/post/S31ganesha-start.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash PROGNAME="Sganesha-start" OPTSPEC="volname:,gd-workdir:,version:,volume-op:,first:" VOL= @@ -10,7 +10,7 @@ GLUSTERD_WORKDIR= function parse_args () { - ARGS=$(getopt -l $OPTSPEC -o "o" -name $PROGNAME "$@") + ARGS=$(getopt -l ${OPTSPEC} -o "o" -name ${PROGNAME} "$@") eval set -- "$ARGS" while true; do @@ -53,16 +53,16 @@ echo -e "# WARNING : Using Gluster CLI will overwrite manual echo "EXPORT{" echo " Export_Id = 2;" -echo " Path = \"/$VOL\";" +echo " Path = \"/${VOL}\";" echo " FSAL {" echo " name = \"GLUSTER\";" echo " hostname=\"localhost\";" -echo " volume=\"$VOL\";" +echo " volume=\"${VOL}\";" echo " }" echo " Access_type = RW;" echo " Disable_ACL = true;" echo " Squash=\"No_root_squash\";" -echo " Pseudo=\"/$VOL\";" +echo " Pseudo=\"/${VOL}\";" echo " Protocols = \"3\", \"4\" ;" echo " Transports = \"UDP\",\"TCP\";" echo " SecType = \"sys\";" @@ -74,14 +74,14 @@ function export_add() { dbus-send --print-reply --system --dest=org.ganesha.nfsd \ /org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \ - string:"$GANESHA_DIR/exports/export.$VOL.conf" string:"EXPORT(Export_Id=$EXPORT_ID)" + string:"${GANESHA_DIR}/exports/export.${VOL}.conf" string:"EXPORT(Export_Id=${EXPORT_ID})" } # based on src/scripts/ganeshactl/Ganesha/export_mgr.py function is_exported() { - local volume="${1}" + local volume="$1" dbus-send --type=method_call --print-reply --system \ --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \ @@ -95,11 +95,11 @@ function is_exported() # enabled for this volume. function ganesha_enabled() { - local volume="${1}" + local volume="$1" local info_file="${GLUSTERD_WORKDIR}/vols/${VOL}/info" local enabled="off" - enabled=$(grep -w "$ganesha_key" "$info_file" | cut -d"=" -f2) + enabled=$(grep -w "${ganesha_key}" "${info_file}" | cut -d'=' -f2) [ "${enabled}" == "on" ] @@ -108,24 +108,24 @@ function ganesha_enabled() parse_args "$@" -if ganesha_enabled "$VOL" && ! is_exported "$VOL" +if ganesha_enabled "${VOL}" && ! is_exported "${VOL}" then if [ ! -e "${GANESHA_DIR}/exports/export.${VOL}.conf" ] then #Remove export entry from nfs-ganesha.conf - sed -i "/$VOL.conf/d" $CONF1 + sed -i "/${VOL}.conf/d" "${CONF1}" write_conf "$VOL" > "${GANESHA_DIR}/exports/export.${VOL}.conf" - EXPORT_ID=$(cat $GANESHA_DIR/.export_added) + EXPORT_ID=$(cat "${GANESHA_DIR}/.export_added") EXPORT_ID=$((EXPORT_ID+1)) - echo $EXPORT_ID > $GANESHA_DIR/.export_added - sed -i s/Export_Id.*/"Export_Id=$EXPORT_ID;"/ \ + echo "${EXPORT_ID}" > "${GANESHA_DIR}/.export_added" + sed -i "s/Export_Id.*/Export_Id=${EXPORT_ID};/" \ "$GANESHA_DIR/exports/export.$VOL.conf" - echo "%include \"$GANESHA_DIR/exports/export.$VOL.conf\"" >> $CONF1 + echo "%include \"${GANESHA_DIR}/exports/export.${VOL}.conf\"" >> "${CONF1}" else - EXPORT_ID=$(grep '^[[:space:]]*Export_Id' "$GANESHA_DIR/exports/export.$VOL.conf" |\ + EXPORT_ID=$(grep '^[[:space:]]*Export_Id' "${GANESHA_DIR}/exports/export.${VOL}.conf" |\ awk -F"[=,;]" '{print $2}' | tr -d '[:space:]') fi - export_add "$VOL" + export_add "${VOL}" fi exit 0 diff --git a/extras/identify-hangs.sh b/extras/identify-hangs.sh index ebc6bf144aa..5abbc8a17d9 100755 --- a/extras/identify-hangs.sh +++ b/extras/identify-hangs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function get_statedump_fnames_without_timestamps { ls | grep -E "[.]dump[.][0-9][0-9]*" | cut -f1-3 -d'.' | sort -u diff --git a/extras/init.d/glusterd-Debian.in b/extras/init.d/glusterd-Debian.in index 918f8592c6e..55dcb9dc4a4 100755 --- a/extras/init.d/glusterd-Debian.in +++ b/extras/init.d/glusterd-Debian.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ### BEGIN INIT INFO # Provides: glusterd # Required-Start: $local_fs $network diff --git a/extras/init.d/glusterd-FreeBSD.in b/extras/init.d/glusterd-FreeBSD.in index 21c3da72624..2f3af78cf9f 100644 --- a/extras/init.d/glusterd-FreeBSD.in +++ b/extras/init.d/glusterd-FreeBSD.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # $FreeBSD$ # diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index 94801fe31a5..5cf3dea9153 100755 --- a/extras/init.d/glusterd-Redhat.in +++ b/extras/init.d/glusterd-Redhat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # glusterd Startup script for the glusterfs server # diff --git a/extras/init.d/glusterd-SuSE.in b/extras/init.d/glusterd-SuSE.in index 6259bab00b6..653c16adacd 100755 --- a/extras/init.d/glusterd-SuSE.in +++ b/extras/init.d/glusterd-SuSE.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ### BEGIN INIT INFO # Provides: glusterd diff --git a/extras/init.d/glustereventsd-Debian.in b/extras/init.d/glustereventsd-Debian.in index 6eebdb2b8d8..d6b4b319aa5 100644 --- a/extras/init.d/glustereventsd-Debian.in +++ b/extras/init.d/glustereventsd-Debian.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash ### BEGIN INIT INFO # Provides: glustereventsd # Required-Start: $local_fs $network diff --git a/extras/init.d/glustereventsd-FreeBSD.in b/extras/init.d/glustereventsd-FreeBSD.in index 2e8303ec6c6..3635dc4b1c4 100644 --- a/extras/init.d/glustereventsd-FreeBSD.in +++ b/extras/init.d/glustereventsd-FreeBSD.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # $FreeBSD$ # diff --git a/extras/init.d/glustereventsd-Redhat.in b/extras/init.d/glustereventsd-Redhat.in index d23ce4c244f..db4de13bb2e 100644 --- a/extras/init.d/glustereventsd-Redhat.in +++ b/extras/init.d/glustereventsd-Redhat.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # glustereventsd Startup script for the glusterfs Events server # diff --git a/extras/migrate-unify-to-distribute.sh b/extras/migrate-unify-to-distribute.sh index ae0c344c975..83241e82763 100755 --- a/extras/migrate-unify-to-distribute.sh +++ b/extras/migrate-unify-to-distribute.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # This is a template script which can be used to migrate the GlusterFS diff --git a/extras/mount-shared-storage.sh b/extras/mount-shared-storage.sh index bd7489493eb..b91b7b8e5e0 100755 --- a/extras/mount-shared-storage.sh +++ b/extras/mount-shared-storage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Post reboot there is a chance in which mounting of shared storage will fail #This will impact starting of features like NFS-Ganesha. So this script will #try to mount the shared storage if it fails diff --git a/extras/ocf/glusterd.in b/extras/ocf/glusterd.in index c119a285d32..b09692451b2 100755 --- a/extras/ocf/glusterd.in +++ b/extras/ocf/glusterd.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # glusterd # diff --git a/extras/ocf/volume.in b/extras/ocf/volume.in index 76cc649e55f..495aa4edc9b 100755 --- a/extras/ocf/volume.in +++ b/extras/ocf/volume.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # # glusterd # diff --git a/extras/peer_add_secret_pub.in b/extras/peer_add_secret_pub.in index c9674af353d..0a683caaf9b 100644 --- a/extras/peer_add_secret_pub.in +++ b/extras/peer_add_secret_pub.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash user=$1 pub_file=$2 diff --git a/extras/post-upgrade-script-for-quota.sh b/extras/post-upgrade-script-for-quota.sh index 15652429056..7389471fcd6 100755 --- a/extras/post-upgrade-script-for-quota.sh +++ b/extras/post-upgrade-script-for-quota.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #The post-upgrade script must be executed after all the nodes in the cluster #have upgraded. diff --git a/extras/pre-upgrade-script-for-quota.sh b/extras/pre-upgrade-script-for-quota.sh index 9ff15f3b307..98894ec0a02 100755 --- a/extras/pre-upgrade-script-for-quota.sh +++ b/extras/pre-upgrade-script-for-quota.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Make sure glusterd and the brick processes are running on all nodes in the #cluster. diff --git a/extras/quota/contri-add.sh b/extras/quota/contri-add.sh index 7db5edd5d20..255df2b6249 100755 --- a/extras/quota/contri-add.sh +++ b/extras/quota/contri-add.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script adds contributions of files/directories in backend to volume # size. @@ -20,20 +20,20 @@ add_contributions () local var=0 local count=0 - SIZE=`getfattr -h -e hex -n trusted.glusterfs.quota.size $2 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2` - CONTRI=`getfattr -h -e hex -d -m trusted.glusterfs.quota.*.contri $2 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2` + SIZE=$(getfattr -h -e hex -n trusted.glusterfs.quota.size "$2" 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2) + CONTRI=$(getfattr -h -e hex -d -m trusted.glusterfs.quota.*.contri "$2" 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2) - if [ $1 == "file" ]; then - PATHS=`find $2 ! -type d | sed -e "\|^$2$|d" | sed -e '/^[ \t]*$/d'` + if [ "$1" == "file" ]; then + PATHS=$(find "$2" ! -type d | sed -e "\|^$2$|d" | sed -e '/^[ \t]*$/d') else - PATHS=`find $2 -maxdepth 1 | sed -e "\|^$2$|d" | sed -e '/^[ \t]*$/d'` + PATHS=$(find "$2" -maxdepth 1 | sed -e "\|^$2$|d" | sed -e '/^[ \t]*$/d') fi if [ -z "$PATHS" ]; then return 0 fi - CONTRIBUTIONS=`echo $PATHS | xargs getfattr -h -e hex -d -m trusted.glusterfs.quota.*.contri 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2 | sed -e 's/^[ \t]*\([^ \t]*\)/\1/g'` + CONTRIBUTIONS=$(echo "$PATHS" | xargs getfattr -h -e hex -d -m trusted.glusterfs.quota.*.contri 2>&1 | sed -e '/^#/d' | sed -e '/^getfattr/d' | sed -e '/^$/d' | cut -d'=' -f 2 | sed -e 's/^[ \t]*\([^ \t]*\)/\1/g') if [ -n "$CONTRIBUTIONS" ]; then for i in $CONTRIBUTIONS; do @@ -42,10 +42,10 @@ add_contributions () done fi - if [ $1 == "file" ] || [ $var -ne $(($SIZE)) ] || [ $(($SIZE)) -ne $(($CONTRI)) ]; then - if [ $1 == "dir" ]; then - TMP_PATH=`echo $2 | sed -e "s/\/home\/export\/[0-9]*/\/mnt\/raghu/g"` - stat $TMP_PATH > /dev/null + if [ "$1" == "file" ] || [ $var -ne $(($SIZE)) ] || [ $(($SIZE)) -ne $(($CONTRI)) ]; then + if [ "$1" == "dir" ]; then + TMP_PATH=`echo "$2" | sed -e "s/\/home\/export\/[0-9]*/\/mnt\/raghu/g"` + stat "$TMP_PATH" > /dev/null fi echo "file count $count" @@ -65,9 +65,9 @@ main () shift 1 - for i in $@; do - add_contributions $TYPE $i + for i in "$@"; do + add_contributions "${TYPE}" "${i}" done } -main $@ \ No newline at end of file +main "$@" diff --git a/extras/quota/log_accounting.sh b/extras/quota/log_accounting.sh index e2dd87b84d7..bbbad68a896 100755 --- a/extras/quota/log_accounting.sh +++ b/extras/quota/log_accounting.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # The script does an accounting of all directories using command 'du' and # using gluster. We can then compare the two to identify accounting mismatch # THere can be minor mismatch because gluster only accounts for the size of diff --git a/extras/quota/simple-quota.sh b/extras/quota/simple-quota.sh index ad174afc85f..384403cd8cd 100644 --- a/extras/quota/simple-quota.sh +++ b/extras/quota/simple-quota.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash INTERVAL=5 MOUNT_DIR= diff --git a/extras/stop-all-gluster-processes.sh b/extras/stop-all-gluster-processes.sh index 710aaf5fd3c..ea2b48ee88b 100755 --- a/extras/stop-all-gluster-processes.sh +++ b/extras/stop-all-gluster-processes.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Kill all the processes/services except glusterd # diff --git a/extras/test/bug-920583.t b/extras/test/bug-920583.t index eedbb800ac0..23aee381e62 100755 --- a/extras/test/bug-920583.t +++ b/extras/test/bug-920583.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##Copy this file to tests/bugs before running run.sh (cp extras/test/bug-920583.t tests/bugs/) diff --git a/extras/test/gluster_commands.sh b/extras/test/gluster_commands.sh index cb2a55fd5b5..a61df3a0f28 100755 --- a/extras/test/gluster_commands.sh +++ b/extras/test/gluster_commands.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2006-2012 Red Hat, Inc. diff --git a/extras/test/ld-preload-test/test-preload.sh b/extras/test/ld-preload-test/test-preload.sh index faed5cee345..51d7316d316 100755 --- a/extras/test/ld-preload-test/test-preload.sh +++ b/extras/test/ld-preload-test/test-preload.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash echo "Testing 32-bit offsets build" LD_PRELOAD="$(pwd)/ld-preload-lib.so" $(pwd)/ld-preload-test32 --path /tmp/testfile diff --git a/extras/test/run.sh b/extras/test/run.sh index 4b3839cf679..8f138dacefb 100755 --- a/extras/test/run.sh +++ b/extras/test/run.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Copyright (c) 2006-2012 Red Hat, Inc. # This file is part of GlusterFS. diff --git a/extras/test/stop_glusterd.sh b/extras/test/stop_glusterd.sh index a2db13f4241..eb8653f8bcd 100755 --- a/extras/test/stop_glusterd.sh +++ b/extras/test/stop_glusterd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2006-2012 Red Hat, Inc. # This file is part of GlusterFS. diff --git a/extras/thin-arbiter/setup-thin-arbiter.sh b/extras/thin-arbiter/setup-thin-arbiter.sh index 0681b30ef3f..86d00707376 100755 --- a/extras/thin-arbiter/setup-thin-arbiter.sh +++ b/extras/thin-arbiter/setup-thin-arbiter.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2018-2019 Red Hat, Inc. # This file is part of GlusterFS. # diff --git a/extras/who-wrote-glusterfs/who-wrote-glusterfs.sh b/extras/who-wrote-glusterfs/who-wrote-glusterfs.sh index 70d5964c576..b3a3af17727 100755 --- a/extras/who-wrote-glusterfs/who-wrote-glusterfs.sh +++ b/extras/who-wrote-glusterfs/who-wrote-glusterfs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Gather statistics on "Who wrote GlusterFS". The idea comes from the excellent # articles on http://lwn.net/ named "Who wrote ?". @@ -11,7 +11,7 @@ # - gitdm.domain-map: map domain names from emailaddresses to companies # -DIRNAME=$(dirname $0) +DIRNAME=$(dirname "${0}") GITDM_REPO=git://git.lwn.net/gitdm.git GITDM_DIR=${DIRNAME}/gitdm @@ -20,7 +20,7 @@ GITDM_CMD="python ${GITDM_DIR}/gitdm" error() { local ret=${?} - printf "${@}\n" > /dev/stderr + printf "%s\n" "${*}" > /dev/stderr return ${ret} } @@ -28,7 +28,7 @@ check_gitdm() { if [ ! -e "${GITDM_DIR}/gitdm" ] then - git clone --quiet ${GITDM_REPO} ${DIRNAME}/gitdm + git clone --quiet "${GITDM_REPO}" "${DIRNAME}"/gitdm fi } @@ -39,7 +39,7 @@ REV=${1} shift # all remaining options are passed to gitdm, see the gitdm script for an # explanation of the accepted options. -GITDM_OPTS=${@} +GITDM_OPTS=${*} if ! check_gitdm then @@ -47,4 +47,4 @@ then exit 1 fi -git log --numstat -M ${REV} | ${GITDM_CMD} -b ${DIRNAME} -n ${GITDM_OPTS} +git log --numstat -M "${REV}" | ${GITDM_CMD} -b "${DIRNAME}" -n "${GITDM_OPTS}" diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index 4ae0ab0f153..936a6074b1d 100755 --- a/geo-replication/src/gverify.sh +++ b/geo-replication/src/gverify.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Script to verify the Primary and Secondary Gluster compatibility. # To use ./gverify diff --git a/geo-replication/src/peer_gsec_create.in b/geo-replication/src/peer_gsec_create.in index 6d4a4847013..bc178c9b6e5 100755 --- a/geo-replication/src/peer_gsec_create.in +++ b/geo-replication/src/peer_gsec_create.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash prefix=@prefix@ exec_prefix=@exec_prefix@ diff --git a/geo-replication/src/set_geo_rep_pem_keys.sh b/geo-replication/src/set_geo_rep_pem_keys.sh index 2342c477c3b..6c89c27976a 100755 --- a/geo-replication/src/set_geo_rep_pem_keys.sh +++ b/geo-replication/src/set_geo_rep_pem_keys.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Script to copy the pem keys from the user's home directory # to $GLUSTERD_WORKDIR/geo-replication and then copy diff --git a/geo-replication/unittests.sh b/geo-replication/unittests.sh index d5dbd00bd4c..a4870f20fab 100644 --- a/geo-replication/unittests.sh +++ b/geo-replication/unittests.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash -cd $(dirname $0)/tests/unit +cd "$(dirname $0)"/tests/unit nosetests -v --exe --with-coverage --cover-package \ - syncdaemon --cover-erase --cover-html --cover-branches $@ + syncdaemon --cover-erase --cover-html --cover-branches "$@" saved_status=$? rm -f .coverage diff --git a/rfc.sh b/rfc.sh index 89ad46dc03b..1f06dba09d7 100755 --- a/rfc.sh +++ b/rfc.sh @@ -1,5 +1,6 @@ -#!/bin/sh -e -# Since we run with '#!/bin/sh -e' +#!/usr/bin/env bash +set -e +set -o pipefail # '$? != 0' will force an exit, # i.e. where we are interested in the result of a command, # we have to run the command in an if-statement. @@ -25,8 +26,8 @@ fi USER_REPO=${GLUSTER_USER_REPO:-origin} if [ "x${USER_REPO}" = "x${UPSTREAM}" ] ; then echo "When you submit patches, it should get submitted to your fork, not to upstream directly" - echo "If you are not sure, check `for rmt in $(git remote); do git remote show $rmt -n; done`" - echo "And pick the correct remote you would like to push to and do `export GLUSTER_USER_REPO=$rmt`" + echo "If you are not sure, check $(for rmt in $(git remote); do git remote show "${rmt}" -n; done)" + echo "And pick the correct remote you would like to push to and do $(export GLUSTER_USER_REPO="${rmt}")" echo "" echo "Exiting..." exit 1 @@ -39,7 +40,7 @@ while getopts "vf" opt; do case $opt in v) # Verbose mode - git () { >&2 echo "git $@" && `which git` $@; } + git () { >&2 echo "git $*" && $(which git) "$@"; } ;; f) # Use force to git push @@ -77,7 +78,7 @@ is_num() num="$1"; - [ -z "$(echo $num | sed -e 's/[0-9]//g')" ] + [ -z "$(echo "${num}" | sed -e 's/[0-9]//g')" ] } backport_id_message() @@ -117,11 +118,11 @@ check_backport() if [ -z "$changeid" ]; then backport_id_message; echo -n "Did not find a Change-Id for a possible backport. Continue (y/N): " - read moveon + read -r moveon else # Search 'devel' for the same change ID (rebase_changes has run, so we # should never not find a Change-Id) - mchangeid=$(git log ${UPSTREAM}/devel --format='%b' --grep="^Change-Id: ${changeid}" | grep ${changeid} | awk '{print $2}') + mchangeid=$(git log "${UPSTREAM}"/devel --format='%b' --grep="^Change-Id: ${changeid}" | grep "${changeid}" | awk '{print $2}') # Check if we found the change ID on 'devel', else throw a message to # decide if we should continue. @@ -135,7 +136,7 @@ check_backport() echo "Change-Id of commit: $changeid" echo "Change-Id on devel: $mchangeid" echo -n "Did not find mentioned Change-Id on 'devel' for a possible backport. Continue (y/N): " - read moveon + read -r moveon fi fi @@ -149,7 +150,7 @@ check_backport() rebase_changes() { - GIT_EDITOR=$0 git rebase -i $UPSTREAM/$branch; + GIT_EDITOR=$0 git rebase -i "${UPSTREAM}/${branch}"; } @@ -196,12 +197,12 @@ REFRE="^[[:space:]]*(Fixes|Updates)(:)?[[:space:]]+#[[:digit:]]+" editor_mode() { - if [ $(basename "$1") = "git-rebase-todo" ]; then - sed 's/^pick /reword /g' "$1" > $1.new && mv $1.new $1; + if [ "$(basename "$1")" = "git-rebase-todo" ]; then + sed 's/^pick /reword /g' "$1" > "$1.new" && mv "$1.new" "$1" ; return; fi - if [ $(basename "$1") = "COMMIT_EDITMSG" ]; then + if [ "$(basename "$1")" = "COMMIT_EDITMSG" ]; then # see note above function warn_reference_missing for regex elaboration # Lets first check for github issues ref=$(git log -n1 --format='%b' | grep -iow -E "${REFRE}" | awk -F '#' '{print $2}'); @@ -210,9 +211,9 @@ editor_mode() fi while true; do - echo Commit: "\"$(head -n 1 $1)\"" + echo Commit: "\"$(head -n 1 "$1" )\"" echo -n "Github Issue ID: " - read issue + read -r issue if [ -z "$issue" ]; then return; fi @@ -223,14 +224,14 @@ editor_mode() echo "Select yes '(y)' if this patch fixes the issue/feature completely," echo -n "or is the last of the patchset which brings feature (Y/n): " - read fixes + read -r fixes fixes_string="Fixes" if [ "${fixes}" = 'N' ] || [ "${fixes}" = 'n' ]; then fixes_string="Updates" fi - sed "/^Change-Id:/{p; s/^.*$/${fixes_string}: #${issue}/;}" $1 > $1.new && \ - mv $1.new $1; + sed "/^Change-Id:/{p; s/^.*$/${fixes_string}: #${issue}/;}" "$1" > "$1.new" && \ + mv "$1.new" "$1"; return; done fi @@ -272,7 +273,7 @@ warn_reference_missing() echo "to gerrit." echo "" echo -n "Missing reference to a github issue. Continue (y/N): " - read moveon + read -r moveon if [ "${moveon}" = 'Y' ] || [ "${moveon}" = 'y' ]; then return; else @@ -291,7 +292,7 @@ main() return; fi - git fetch $UPSTREAM; + git fetch "${UPSTREAM}" ; rebase_changes; @@ -310,7 +311,7 @@ main() # TODO: add clang-format command here. It will after the changes are done everywhere else clang_format=$(clang-format --version) - if [ ! -z "${clang_format}" ]; then + if [ -n "${clang_format}" ]; then # Considering git show may not give any files as output matching the # criteria, good to tell script not to fail on error set +e @@ -332,9 +333,9 @@ main() fi if [ -z "${reference}" ]; then - $drier git push $USER_REPO HEAD:temp_${branch}/$(date +%Y-%m-%d_%s) $FORCE; + $drier git push "${USER_REPO}" HEAD:"temp_${branch}/$(date +%Y-%m-%d_%s)" "${FORCE}"; else - $drier git push $USER_REPO HEAD:issue${reference}_${branch} $FORCE; + $drier git push "${USER_REPO}" HEAD:"issue${reference}_${branch}" "${FORCE}"; fi } diff --git a/run-tests-in-vagrant.sh b/run-tests-in-vagrant.sh index a3f2ac7c72d..ac6f7cb3a85 100755 --- a/run-tests-in-vagrant.sh +++ b/run-tests-in-vagrant.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ############################################################################### # TODO: Support other OSes. # diff --git a/run-tests.sh b/run-tests.sh index 6c9cc3084ea..da722d5ae68 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright (c) 2013-2014 Red Hat, Inc. # @@ -67,7 +67,7 @@ function tar_logs() t=$1 logdir=$(gluster --print-logdir) - basetarname=$(basename "$t" .t) + basetarname=$(basename "${t}" .t) if [ -n "$logdir" ] then @@ -98,93 +98,93 @@ function tar_logs() function check_dependencies() { - ## Check all dependencies are present + # Check all dependencies are present MISSING="" # Check for dbench env dbench --usage > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING dbench" + MISSING="${MISSING} dbench" fi # Check for git env git --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING git" + MISSING="${MISSING} git" fi # Check for nfs-utils (Linux-only: built-in NetBSD with different name) - if [ "x`uname -s`" = "xLinux" ] ; then + if [ "x$(uname -s)" = "xLinux" ] ; then env mount.nfs -V > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING nfs-utils" + MISSING="${MISSING} nfs-utils" fi fi # Check for netstat env netstat --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING netstat" + MISSING="${MISSING} netstat" fi # Check for the Perl Test Harness env prove --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING perl-Test-Harness" + MISSING="${MISSING} perl-Test-Harness" fi which json_verify > /dev/null if [ $? -ne 0 ]; then - MISSING="$MISSING json_verify" + MISSING="${MISSING} json_verify" fi # Check for XFS programs (Linux Only: NetBSD does without) if [ "x`uname -s`" = "xLinux" ] ; then env mkfs.xfs -V > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING xfsprogs" + MISSING="${MISSING} xfsprogs" fi fi # Check for attr env getfattr --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING attr" + MISSING="${MISSING} attr" fi # Check for pidof pidof pidof > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING pidof" + MISSING="${MISSING} pidof" fi # Check for netstat env netstat --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING netstat" + MISSING="${MISSING} netstat" fi # Check for killall env killall --version > /dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING killall" + MISSING="${MISSING} killall" fi # check for psutil python package - test `uname -s` == "Darwin" || test `uname -s` == "FreeBSD" && { + test "$(uname -s)" == "Darwin" || test "$(uname -s)" == "FreeBSD" && { pip show psutil | grep -q psutil >/dev/null 2>&1 if [ $? -ne 0 ]; then - MISSING="$MISSING psutil" + MISSING="${MISSING} psutil" fi } ## If dependencies are missing, warn the user and abort - if [ "x$MISSING" != "x" ]; then + if [ "x${MISSING}" != "x" ]; then test "x${force}" != "xyes" && echo "Aborting." echo echo "The following required tools are missing:" echo - for pkg in $MISSING; do + for pkg in ${MISSING}; do echo " * $pkg" done echo @@ -197,9 +197,9 @@ function check_dependencies() function check_location() { - regression_testsdir=$(dirname $0); + regression_testsdir=$(dirname "${0}"); - if [ ! -f ${regression_testsdir}/tests/include.rc ]; then + if [ ! -f "${regression_testsdir}"/tests/include.rc ]; then echo "Aborting." echo echo "The tests/ subdirectory seems to be missing." @@ -213,8 +213,8 @@ function check_location() function check_user() { # If we're not running as root, warn the user and abort - MYUID=`/usr/bin/id -u` - if [ 0${MYUID} -ne 0 ]; then + MYUID=$(/usr/bin/id -u) + if [ "${MYUID}" -ne 0 ]; then echo "Aborting." echo echo "The GlusterFS Test Framework must be run as root." @@ -245,12 +245,12 @@ function match() shift local a local match=1 - if [ -z "$@" ]; then + if [ -z "$*" ]; then match=0 return $match fi - for a in $@ ; do - case "$t" in + for a in "$@" ; do + case "${t}" in *$a*) match=0 ;; @@ -285,11 +285,11 @@ function get_test_status () # Because changing the key in all test files would be very big process # updating just this function with a better logic much simpler. Linux) - result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" $test_name | \ - awk -F"," {'print $1'} | awk -F"=" {'print $2'}) ;; + result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" "$test_name" | \ + awk -F"," '{print $1}' | awk -F"=" '{print $2}') ;; NetBSD) - result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" $test_name | \ - awk -F"," {'print $1'} | awk -F"=" {'print $2'}) ;; + result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" "$test_name" | \ + awk -F"," '{print $1}' | awk -F"=" '{print $2}') ;; *) result="ENABLED" ;; esac @@ -312,11 +312,11 @@ function get_bug_list_for_disabled_test () # Because changing the key in all test files would be very big process # updating just this function with a better logic much simpler. Linux) - result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" $test_name | \ - awk -F"," {'print $2'} | awk -F"=" {'print $2'}) ;; + result=$(grep -e "^#G_TESTDEF_TEST_STATUS_CENTOS6" "$test_name" | \ + awk -F"," '{print $2}' | awk -F"=" '{print $2}') ;; NetBSD) - result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" $test_name | \ - awk -F"," {'print $2'} | awk -F"=" {'print $2'}) ;; + result=$(grep -e "^#G_TESTDEF_TEST_STATUS_NETBSD7" "$test_name" | \ + awk -F"," '{print $2}' | awk -F"=" '{print $2}') ;; *) result="0000000" ;; esac @@ -355,59 +355,59 @@ function run_tests() for t in "${all_tests[@]}" ; do old_cores=$(ls /*-*.core 2> /dev/null | wc -l) total_tests=$((total_tests+1)) - if match $t "$@" ; then + if match "${t}" "$@" ; then selected_tests=$((selected_tests+1)) ${secho} ${secho} $section_separator "(${total_tests} / ${all_tests_cnt})" $section_separator - if [[ $(get_test_status $t) =~ "BAD_TEST" ]] && \ - [[ $skip_bad_tests == "yes" ]] + if [[ "$(get_test_status "${t}")" =~ "BAD_TEST" ]] && \ + [[ "${skip_bad_tests}" == "yes" ]] then skipped_bad_tests=$((skipped_bad_tests+1)) - ${secho} "Skipping bad test file $t" - ${secho} "Reason: bug(s):" $(get_bug_list_for_disabled_test $t) - ${secho} $section_separator$section_separator + ${secho} "Skipping bad test file ${t}" + ${secho} "Reason: bug(s): $(get_bug_list_for_disabled_test "${t}")" + ${secho} "${section_separator}${section_separator}" ${secho} continue fi - if [[ $(get_test_status $t) == "KNOWN_ISSUE" ]] && \ - [[ $skip_known_bugs == "yes" ]] + if [[ "$(get_test_status "${t}")" == "KNOWN_ISSUE" ]] && \ + [[ "${skip_known_bugs}" == "yes" ]] then skipped_known_issue_tests=$((skipped_known_issue_tests+1)) - ${secho} "Skipping test file $t due to known issue" - ${secho} "Reason: bug(s):" $(get_bug_list_for_disabled_test $t) - ${secho} $section_separator$section_separator + ${secho} "Skipping test file ${t} due to known issue" + ${secho} "Reason: bug(s): $(get_bug_list_for_disabled_test "${t}")" + ${secho} "${section_separator}${section_separator}" ${secho} continue fi - if [[ $(get_test_status $t) == "NFS_TEST" ]] && \ - [[ $nfs_tests == "no" ]] + if [[ "$(get_test_status "${t}")" == "NFS_TEST" ]] && \ + [[ "${nfs_tests}" == "no" ]] then - ${secho} "Skipping nfs test file $t" - ${secho} $section_separator$section_separator + ${secho} "Skipping nfs test file ${t}" + ${secho} "${section_separator}${section_separator}" ${secho} continue fi if [ x"$list_only" == x"yes" ]; then - echo $(realpath --relative-to "$(dirname "${0}")" "${t}") + echo "$(realpath --relative-to "$(dirname "${0}")" "${t}")" continue fi total_run_tests=$((total_run_tests+1)) - echo "[$(date +%H:%M:%S)] Running tests in file $t" + echo "[$(date +%H:%M:%S)] Running tests in file ${t}" starttime="$(date +%s)" local cmd_timeout=$run_timeout; - if [ ${timeout_cmd_exists} == "yes" ]; then - if [ $(grep -c "SCRIPT_TIMEOUT=" ${t}) == 1 ] ; then - cmd_timeout=$(grep "SCRIPT_TIMEOUT=" ${t} | cut -f2 -d'='); + if [ "${timeout_cmd_exists}" == "yes" ]; then + if [ "$(grep -c "SCRIPT_TIMEOUT=" "${t}")" == 1 ] ; then + cmd_timeout=$(grep "SCRIPT_TIMEOUT=" "${t}" | cut -f2 -d'='); echo "Timeout set is ${cmd_timeout}, default ${run_timeout}" fi - timeout --foreground -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} + timeout --foreground -k ${kill_after_time} "${cmd_timeout}" prove -vmfe '/bin/bash' "${t}" else - prove -vmfe '/bin/bash' ${t} + prove -vmfe '/bin/bash' "${t}" fi TMP_RES=$? - ELAPSEDTIMEMAP[$t]=`expr $(date +%s) - $starttime` - tar_logs "$t" + ELAPSEDTIMEMAP[${t}]=$(expr $(date +%s) - $starttime) + tar_logs "${t}" # timeout always return 124 if it is actually a timeout. if ((${TMP_RES} == 124)); then @@ -415,7 +415,7 @@ function run_tests() fi if [ ${TMP_RES} -ne 0 ] && [ "x${retry}" = "xyes" ] ; then - echo "$t: bad status $TMP_RES" + echo "${t}: bad status $TMP_RES" echo "" echo " *********************************" echo " * REGRESSION FAILED *" @@ -427,10 +427,10 @@ function run_tests() if [ ${timeout_cmd_exists} == "yes" ]; then timeout --foreground -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} else - prove -vmfe '/bin/bash' ${t} + prove -vmfe '/bin/bash' "${t}" fi TMP_RES=$? - tar_logs "$t" + tar_logs "${t}" if ((${TMP_RES} == 124)); then echo "${t} timed out after ${cmd_timeout} seconds" @@ -441,7 +441,7 @@ function run_tests() if [ ${TMP_RES} -ne 0 ] ; then - if [[ "$t" == *"tests/000-flaky/"* ]]; then + if [[ "${t}" == *"tests/000-flaky/"* ]]; then FLAKY="${FLAKY}${t} " echo "FAILURE -> SUCCESS: Flaky test" TMP_RES=0 @@ -454,11 +454,11 @@ function run_tests() new_cores=$(ls /*-*.core 2> /dev/null | wc -l) if [ x"$new_cores" != x"$old_cores" ]; then core_diff=$((new_cores-old_cores)) - echo "$t: $core_diff new core files" + echo "${t}: $core_diff new core files" RES=1 GENERATED_CORE="${GENERATED_CORE}${t} " fi - echo "End of test $t" + echo "End of test ${t}" echo $section_separator$section_separator echo if [ $RES -ne 0 ] && [ x"$exit_on_failure" = "xyes" ] ; then @@ -493,23 +493,23 @@ function run_tests() # Output the errors into a file if [ ${RES} -ne 0 ] ; then - FAILED=$( echo ${FAILED} | tr ' ' '\n' | sort -u ) + FAILED=$( echo "${FAILED}" | tr ' ' '\n' | sort -u ) FAILED_COUNT=$( echo -n "${FAILED}" | grep -c '^' ) echo -e "\n$FAILED_COUNT test(s) failed \n${FAILED}" >> "${result_output}" - GENERATED_CORE=$( echo ${GENERATED_CORE} | tr ' ' '\n' | sort -u ) + GENERATED_CORE=$( echo "${GENERATED_CORE}" | tr ' ' '\n' | sort -u ) GENERATED_CORE_COUNT=$( echo -n "${GENERATED_CORE}" | grep -c '^' ) echo -e "\n$GENERATED_CORE_COUNT test(s) generated core \n${GENERATED_CORE}" >> "${result_output}" cat "${result_output}" fi - TESTS_NEEDED_RETRY=$( echo ${TESTS_NEEDED_RETRY} | tr ' ' '\n' | sort -u ) + TESTS_NEEDED_RETRY=$( echo "${TESTS_NEEDED_RETRY}" | tr ' ' '\n' | sort -u ) RETRY_COUNT=$( echo -n "${TESTS_NEEDED_RETRY}" | grep -c '^' ) - if [ ${RETRY_COUNT} -ne 0 ] ; then + if [ "${RETRY_COUNT}" -ne 0 ] ; then echo -e "\n${RETRY_COUNT} test(s) needed retry \n${TESTS_NEEDED_RETRY}" >> "${result_output}" fi - FLAKY_TESTS_FAILED=$( echo ${FLAKY} | tr ' ' '\n' | sort -u ) + FLAKY_TESTS_FAILED=$( echo "${FLAKY}" | tr ' ' '\n' | sort -u ) RETRY_COUNT=$( echo -n "${FLAKY_TESTS_FAILED}" | grep -c '^' ) - if [ ${RETRY_COUNT} -ne 0 ] ; then + if [ "${RETRY_COUNT}" -ne 0 ] ; then echo -e "\n${RETRY_COUNT} flaky test(s) marked as success even though they failed \n${FLAKY_TESTS_FAILED}" >> "${result_output}" fi @@ -521,7 +521,7 @@ function run_tests() function run_head_tests() { - [ -d ${regression_testsdir}/.git ] || return 0 + [ -d "${regression_testsdir}"/.git ] || return 0 # The git command needs $cwd to be within the repository, but run_tests # needs it to be back where we started. @@ -567,7 +567,7 @@ usage="no" function parse_args () { - args=`getopt -u -l help frRcbkphHnlo:t: "$@"` + args=$(getopt -u -l help frRcbkphHnlo:t: "$@") if ! [ $? -eq 0 ]; then show_usage exit 1 @@ -593,7 +593,7 @@ function parse_args () esac shift done - tests="$@" + tests="$*" } # Get user options diff --git a/submit-for-review.sh b/submit-for-review.sh deleted file mode 120000 index a21c0e2869a..00000000000 --- a/submit-for-review.sh +++ /dev/null @@ -1 +0,0 @@ -rfc.sh \ No newline at end of file diff --git a/submit-for-review.sh b/submit-for-review.sh new file mode 100755 index 00000000000..5f45323b27a --- /dev/null +++ b/submit-for-review.sh @@ -0,0 +1,342 @@ +#!/usr/bin/env bash +set -e +set -o pipefail +# '$? != 0' will force an exit, +# i.e. where we are interested in the result of a command, +# we have to run the command in an if-statement. + +UPSTREAM=${GLUSTER_UPSTREAM} +if [ "x$UPSTREAM" = "x" ]; then + for rmt in $(git remote); do + rmt_repo=$(LANGUAGE=en_US.UTF-8 git remote show "${rmt}" -n | grep Fetch | awk '{ print $3 }'); + if [ "${rmt_repo%.git}" = "git@github.com:gluster/glusterfs" ]; then + UPSTREAM=$rmt + echo "Picked ${UPSTREAM} as upstream remote" + break + fi + done + if [ "x$UPSTREAM" = "x" ]; then + echo "No git remote detected for git@github.com:gluster/glusterfs.git" + echo "" + echo "Exiting." + exit 1 + fi +fi + +USER_REPO=${GLUSTER_USER_REPO:-origin} +if [ "x${USER_REPO}" = "x${UPSTREAM}" ] ; then + echo "When you submit patches, it should get submitted to your fork, not to upstream directly" + echo "If you are not sure, check $(for rmt in $(git remote); do git remote show "${rmt}" -n; done)" + echo "And pick the correct remote you would like to push to and do $(export GLUSTER_USER_REPO=${rmt})" + echo "" + echo "Exiting..." + exit 1 +fi + +echo "Picked ${USER_REPO} as user's remote"; + +FORCE=""; +while getopts "vf" opt; do + case $opt in + v) + # Verbose mode + git () { >&2 echo "git $*" && $(which git) "$*"; } + ;; + f) + # Use force to git push + FORCE="--force"; + ;; + esac +done +# Move the positional arguments to the beginning +shift $((OPTIND-1)) + + +branch="devel"; + +set_hooks_commit_msg() +{ + f=".git/hooks/commit-msg"; + u="http://review.gluster.org/tools/hooks/commit-msg"; + + if [ -x "$f" ]; then + return; + fi + + curl -L -o "${f}" "${u}" || wget -O "${f}" "${u}"; + + chmod +x "${f}" + + # Let the 'Change-Id: ' header get assigned on first run of rfc.sh + GIT_EDITOR=true git commit --amend; +} + + +is_num() +{ + local num; + + num="$1"; + + [ -z "$(echo $num | sed -e 's/[0-9]//g')" ] +} + +backport_id_message() +{ + echo "" + echo "This commit is to a non-devel branch, and hence is treated as a backport." + echo "" + echo "For backports we would like to retain the same gerrit Change-Id across" + echo "branches. On auto inspection it is found that a gerrit Change-Id is" + echo "missing, or the Change-Id is not found on your local devel branch" + echo "" + echo "This could mean a few things:" + echo " 1. This is not a backport, hence choose Y on the prompt to proceed" + echo " 2. Your $USER_REPO/devel is not up to date, hence the script is unable" + echo " to find the corresponding Change-Id on devel. Either choose N," + echo " 'git fetch', and try again, OR if you are sure you used the" + echo " same Change-Id, choose Y at the prompt to proceed" + echo " 3. You commented or removed the Change-Id in your commit message after" + echo " cherry picking the commit. Choose N, fix the commit message to" + echo " use the same Change-Id as 'devel' (git commit --amend), resubmit" + echo "" +} + +check_backport() +{ + moveon='N' + + # Backports are never made to 'devel' + if [ $branch = "devel" ]; then + return; + fi + + # Extract the change ID from the commit message + changeid=$(git log -n1 --format='%b' | grep -i '^Change-Id: ' | awk '{print $2}') + + # If there is no change ID ask if we should continue + if [ -z "$changeid" ]; then + backport_id_message; + echo -n "Did not find a Change-Id for a possible backport. Continue (y/N): " + read moveon + else + # Search 'devel' for the same change ID (rebase_changes has run, so we + # should never not find a Change-Id) + mchangeid=$(git log "${UPSTREAM}/devel" --format='%b' --grep="^Change-Id: ${changeid}" | grep "${changeid}" | awk '{print $2}') + + # Check if we found the change ID on 'devel', else throw a message to + # decide if we should continue. + # NOTE: If 'devel' was not rebased, we will not find the Change-ID and + # could hit a false positive case here (or if someone checks out some + # other branch as 'devel'). + if [ "${mchangeid}" = "${changeid}" ]; then + moveon="Y" + else + backport_id_message; + echo "Change-Id of commit: $changeid" + echo "Change-Id on devel: $mchangeid" + echo -n "Did not find mentioned Change-Id on 'devel' for a possible backport. Continue (y/N): " + read moveon + fi + fi + + if [ "${moveon}" = 'Y' ] || [ "${moveon}" = 'y' ]; then + return; + else + exit 1 + fi +} + + +rebase_changes() +{ + GIT_EDITOR=$0 git rebase -i $UPSTREAM/$branch; +} + + +# Regex elaborated: +# grep options: +# -w -> --word-regexp (from the man page) +# Select only those lines containing matches that form whole words. +# The test is that the matching substring must either be at the +# beginning of the line, or preceded by a non-word constituent +# character. Similarly, it must be either at the end of the line or +# followed by a non-word constituent character. Word-constituent +# characters are letters, digits, and the underscore. +# +# IOW, the above helps us find the pattern with leading or training +# spaces or non word consituents like , or ; +# +# -i -> --ignore-case (case insensitive search) +# +# -o -> --only-matching (only print matching portion of the line) +# +# -E -> --extended-regexp (use extended regular expression) +# +# ^ +# The search begins at the start of each line +# +# [[:space:]]* +# Any number of spaces is accepted +# +# (Fixes|Updates) +# Finds 'Fixes' OR 'Updates' in any case combination +# +# (:)? +# Followed by an optional : (colon) +# +# [[:space:]]+ +# Followed by 1 or more spaces +# +# # +# Followed by # +# +# [[:digit:]]+ +# Followed by 1 or more digits +REFRE="^[[:space:]]*(Fixes|Updates)(:)?[[:space:]]+#[[:digit:]]+" + +editor_mode() +{ + if [ $(basename "$1") = "git-rebase-todo" ]; then + sed 's/^pick /reword /g' "$1" > $1.new && mv $1.new $1; + return; + fi + + if [ $(basename "$1") = "COMMIT_EDITMSG" ]; then + # see note above function warn_reference_missing for regex elaboration + # Lets first check for github issues + ref=$(git log -n1 --format='%b' | grep -iow -E "${REFRE}" | awk -F '#' '{print $2}'); + if [ "x${ref}" != "x" ]; then + return; + fi + + while true; do + echo Commit: "\"$(head -n 1 $1)\"" + echo -n "Github Issue ID: " + read issue + if [ -z "$issue" ]; then + return; + fi + if ! is_num "$issue"; then + echo "Invalid Github Issue ID!!!"; + continue; + fi + + echo "Select yes '(y)' if this patch fixes the issue/feature completely," + echo -n "or is the last of the patchset which brings feature (Y/n): " + read fixes + fixes_string="Fixes" + if [ "${fixes}" = 'N' ] || [ "${fixes}" = 'n' ]; then + fixes_string="Updates" + fi + + sed "/^Change-Id:/{p; s/^.*$/${fixes_string}: #${issue}/;}" "$1" > "$1.new" && \ + mv "$1.new" "$1" ; + return; + done + fi + + cat < ${SSH_ASKPASS_SCRIPT} < bitrot * command succeeds, diff --git a/tests/bugs/bitrot/bug-1245981.t b/tests/bugs/bitrot/bug-1245981.t index f3955256b01..5f1bc3affcd 100644 --- a/tests/bugs/bitrot/bug-1245981.t +++ b/tests/bugs/bitrot/bug-1245981.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Test case for bitrot ## Tunable object signing waiting time value for bitrot. diff --git a/tests/bugs/bitrot/bug-1288490.t b/tests/bugs/bitrot/bug-1288490.t index 5f67f4a6ec5..14441216a52 100644 --- a/tests/bugs/bitrot/bug-1288490.t +++ b/tests/bugs/bitrot/bug-1288490.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/bug-1064147.t b/tests/bugs/bug-1064147.t index 6cebc7f3e37..02f03af21ac 100755 --- a/tests/bugs/bug-1064147.t +++ b/tests/bugs/bug-1064147.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/bug-1110262.t b/tests/bugs/bug-1110262.t index 90b101fc98d..5a9fa5a124f 100644 --- a/tests/bugs/bug-1110262.t +++ b/tests/bugs/bug-1110262.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/bug-1138841.t b/tests/bugs/bug-1138841.t index abec5e89d56..d4b0b276c74 100644 --- a/tests/bugs/bug-1138841.t +++ b/tests/bugs/bug-1138841.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1258069.t b/tests/bugs/bug-1258069.t index b87ecbf2fe8..cccc19d3a06 100755 --- a/tests/bugs/bug-1258069.t +++ b/tests/bugs/bug-1258069.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/bug-1368312.t b/tests/bugs/bug-1368312.t index c60d562bbd7..7104425c257 100644 --- a/tests/bugs/bug-1368312.t +++ b/tests/bugs/bug-1368312.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc cleanup; diff --git a/tests/bugs/bug-1371806.t b/tests/bugs/bug-1371806.t index 08180525650..64ea58b13c5 100644 --- a/tests/bugs/bug-1371806.t +++ b/tests/bugs/bug-1371806.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1371806_1.t b/tests/bugs/bug-1371806_1.t index df19a8c1c2a..be759f4f149 100644 --- a/tests/bugs/bug-1371806_1.t +++ b/tests/bugs/bug-1371806_1.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1371806_2.t b/tests/bugs/bug-1371806_2.t index e6aa8e7c1ad..3d0f50ff906 100644 --- a/tests/bugs/bug-1371806_2.t +++ b/tests/bugs/bug-1371806_2.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1371806_3.t b/tests/bugs/bug-1371806_3.t index cb13f37c737..0488e6f186f 100644 --- a/tests/bugs/bug-1371806_3.t +++ b/tests/bugs/bug-1371806_3.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1371806_acl.t b/tests/bugs/bug-1371806_acl.t index c39165628cc..69b84dd9dd9 100644 --- a/tests/bugs/bug-1371806_acl.t +++ b/tests/bugs/bug-1371806_acl.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/bug-1584517.t b/tests/bugs/bug-1584517.t index 7f48015a034..d5cad3adedd 100644 --- a/tests/bugs/bug-1584517.t +++ b/tests/bugs/bug-1584517.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/bug-1620580.t b/tests/bugs/bug-1620580.t index 0c74d4a6089..e11669f92a6 100644 --- a/tests/bugs/bug-1620580.t +++ b/tests/bugs/bug-1620580.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/bug-1694920.t b/tests/bugs/bug-1694920.t index 5bf93c92f94..e90668f2a45 100644 --- a/tests/bugs/bug-1694920.t +++ b/tests/bugs/bug-1694920.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=300 diff --git a/tests/bugs/bug-1702299.t b/tests/bugs/bug-1702299.t index 4bfceaba80c..2f4cc2083a8 100644 --- a/tests/bugs/bug-1702299.t +++ b/tests/bugs/bug-1702299.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../dht.rc diff --git a/tests/bugs/changelog/bug-1208470.t b/tests/bugs/changelog/bug-1208470.t index 526f8f20612..f26d44aee9c 100755 --- a/tests/bugs/changelog/bug-1208470.t +++ b/tests/bugs/changelog/bug-1208470.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Testcase: ## Avoid creating any EMPTY changelog(over the changelog rollover time) diff --git a/tests/bugs/changelog/bug-1211327.t b/tests/bugs/changelog/bug-1211327.t index a849ec3981f..d2252e0d820 100644 --- a/tests/bugs/changelog/bug-1211327.t +++ b/tests/bugs/changelog/bug-1211327.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Testcase: #On brick restart, new HTIME.TSTAMP file should not be created. diff --git a/tests/bugs/changelog/bug-1225542.t b/tests/bugs/changelog/bug-1225542.t index a646aa88014..a884384ee08 100644 --- a/tests/bugs/changelog/bug-1225542.t +++ b/tests/bugs/changelog/bug-1225542.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Testcase: #On snapshot, notify changelog reconfigure upon explicit rollover diff --git a/tests/bugs/changelog/bug-1321955.t b/tests/bugs/changelog/bug-1321955.t index 9e3752b1728..c85fdeeb0b8 100644 --- a/tests/bugs/changelog/bug-1321955.t +++ b/tests/bugs/changelog/bug-1321955.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #This file checks if missing entry self-heal and entry self-heal are working #as expected. diff --git a/tests/bugs/cidr-bug-4108.t b/tests/bugs/cidr-bug-4108.t index f1fec825013..7a0d329be75 100644 --- a/tests/bugs/cidr-bug-4108.t +++ b/tests/bugs/cidr-bug-4108.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/bugs/cli/bug-1004218.t b/tests/bugs/cli/bug-1004218.t index ab8307d6405..d313f472e41 100644 --- a/tests/bugs/cli/bug-1004218.t +++ b/tests/bugs/cli/bug-1004218.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test if only a single xml document is generated by 'status all' # when a volume is not started diff --git a/tests/bugs/cli/bug-1022905.t b/tests/bugs/cli/bug-1022905.t index ee629e970d9..28b78656591 100644 --- a/tests/bugs/cli/bug-1022905.t +++ b/tests/bugs/cli/bug-1022905.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1030580.t b/tests/bugs/cli/bug-1030580.t index ac8b1d8f6db..16a6866a64b 100644 --- a/tests/bugs/cli/bug-1030580.t +++ b/tests/bugs/cli/bug-1030580.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1047378.t b/tests/bugs/cli/bug-1047378.t index 33ee6be3d8b..9d26ddfac48 100644 --- a/tests/bugs/cli/bug-1047378.t +++ b/tests/bugs/cli/bug-1047378.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/cli/bug-1047416.t b/tests/bugs/cli/bug-1047416.t index 864301034c9..4e8651b8e2f 100644 --- a/tests/bugs/cli/bug-1047416.t +++ b/tests/bugs/cli/bug-1047416.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1077682.t b/tests/bugs/cli/bug-1077682.t index eab5d86d04b..ea23efac883 100644 --- a/tests/bugs/cli/bug-1077682.t +++ b/tests/bugs/cli/bug-1077682.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1087487.t b/tests/bugs/cli/bug-1087487.t index 0659ffab684..8323094fbf2 100755 --- a/tests/bugs/cli/bug-1087487.t +++ b/tests/bugs/cli/bug-1087487.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1113476.t b/tests/bugs/cli/bug-1113476.t index fc7dbca537d..0301da21a40 100644 --- a/tests/bugs/cli/bug-1113476.t +++ b/tests/bugs/cli/bug-1113476.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1169302.t b/tests/bugs/cli/bug-1169302.t index 19660e033a8..3fb5202d17d 100755 --- a/tests/bugs/cli/bug-1169302.t +++ b/tests/bugs/cli/bug-1169302.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1320388.t b/tests/bugs/cli/bug-1320388.t index 12ae837569d..b89abf70434 100755 --- a/tests/bugs/cli/bug-1320388.t +++ b/tests/bugs/cli/bug-1320388.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t index a4556c9c997..38a343795ea 100644 --- a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t +++ b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-1378842-volume-get-all.t b/tests/bugs/cli/bug-1378842-volume-get-all.t index be41f25b000..a431ea76d18 100644 --- a/tests/bugs/cli/bug-1378842-volume-get-all.t +++ b/tests/bugs/cli/bug-1378842-volume-get-all.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-764638.t b/tests/bugs/cli/bug-764638.t index ffc613409d6..ecd8b36a60f 100644 --- a/tests/bugs/cli/bug-764638.t +++ b/tests/bugs/cli/bug-764638.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/cli/bug-822830.t b/tests/bugs/cli/bug-822830.t index a9904854110..7828bf80238 100755 --- a/tests/bugs/cli/bug-822830.t +++ b/tests/bugs/cli/bug-822830.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-867252.t b/tests/bugs/cli/bug-867252.t index ccc33d82a0f..8c9b3c7d731 100644 --- a/tests/bugs/cli/bug-867252.t +++ b/tests/bugs/cli/bug-867252.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/cli/bug-921215.t b/tests/bugs/cli/bug-921215.t index 02532562cff..5e2366628a7 100755 --- a/tests/bugs/cli/bug-921215.t +++ b/tests/bugs/cli/bug-921215.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is test case for bug no 921215 "Can not create volume with a . in the name" diff --git a/tests/bugs/cli/bug-949298.t b/tests/bugs/cli/bug-949298.t index e0692f0c157..0508532701d 100644 --- a/tests/bugs/cli/bug-949298.t +++ b/tests/bugs/cli/bug-949298.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-961307.t b/tests/bugs/cli/bug-961307.t index 602a6e34bce..861b20857c0 100644 --- a/tests/bugs/cli/bug-961307.t +++ b/tests/bugs/cli/bug-961307.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-969193.t b/tests/bugs/cli/bug-969193.t index dd6d7cdf100..f018db75250 100755 --- a/tests/bugs/cli/bug-969193.t +++ b/tests/bugs/cli/bug-969193.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test that "system getspec" works without op_version problems. diff --git a/tests/bugs/cli/bug-977246.t b/tests/bugs/cli/bug-977246.t index bb8d6328e8b..59b4b07eced 100644 --- a/tests/bugs/cli/bug-977246.t +++ b/tests/bugs/cli/bug-977246.t @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # This test checks if address validation, correctly catches hostnames # with consective dots, such as 'example..org', as invalid diff --git a/tests/bugs/cli/bug-982174.t b/tests/bugs/cli/bug-982174.t index 067e5b97c17..a22cc5d4f4e 100644 --- a/tests/bugs/cli/bug-982174.t +++ b/tests/bugs/cli/bug-982174.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test to check . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/cli/bug-983317-volume-get.t b/tests/bugs/cli/bug-983317-volume-get.t index c793bbc9f0c..8ecdd3933a7 100644 --- a/tests/bugs/cli/bug-983317-volume-get.t +++ b/tests/bugs/cli/bug-983317-volume-get.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/949327.t b/tests/bugs/core/949327.t index 6b8033a5c85..32e932312fd 100644 --- a/tests/bugs/core/949327.t +++ b/tests/bugs/core/949327.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/brick-mux-fd-cleanup.t b/tests/bugs/core/brick-mux-fd-cleanup.t index de11c177b8a..2f63d282cdb 100644 --- a/tests/bugs/core/brick-mux-fd-cleanup.t +++ b/tests/bugs/core/brick-mux-fd-cleanup.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1110917.t b/tests/bugs/core/bug-1110917.t index c4b04fbf2c7..cb7941833a3 100644 --- a/tests/bugs/core/bug-1110917.t +++ b/tests/bugs/core/bug-1110917.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1111557.t b/tests/bugs/core/bug-1111557.t index 4ed45761bce..611ddd1fa3b 100644 --- a/tests/bugs/core/bug-1111557.t +++ b/tests/bugs/core/bug-1111557.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/core/bug-1117951.t b/tests/bugs/core/bug-1117951.t index b484fee2fe4..25ce2ca18f8 100644 --- a/tests/bugs/core/bug-1117951.t +++ b/tests/bugs/core/bug-1117951.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1119582.t b/tests/bugs/core/bug-1119582.t index c30057c2b2c..a0c5a806c13 100644 --- a/tests/bugs/core/bug-1119582.t +++ b/tests/bugs/core/bug-1119582.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1135514-allow-setxattr-with-null-value.t b/tests/bugs/core/bug-1135514-allow-setxattr-with-null-value.t index d26aa561321..4022d03371a 100644 --- a/tests/bugs/core/bug-1135514-allow-setxattr-with-null-value.t +++ b/tests/bugs/core/bug-1135514-allow-setxattr-with-null-value.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1168803-snapd-option-validation-fix.t b/tests/bugs/core/bug-1168803-snapd-option-validation-fix.t index 89b015d6374..751226fee0a 100755 --- a/tests/bugs/core/bug-1168803-snapd-option-validation-fix.t +++ b/tests/bugs/core/bug-1168803-snapd-option-validation-fix.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Test case for BZ-1168803 - snapd option validation should not fail if the #snapd is not running diff --git a/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t b/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t index a1b9a851bf7..9c90cb41886 100755 --- a/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t +++ b/tests/bugs/core/bug-1402841.t-mt-dir-scan-race.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/core/bug-1421721-mpx-toggle.t b/tests/bugs/core/bug-1421721-mpx-toggle.t index 231be5b81a0..c52048412d0 100644 --- a/tests/bugs/core/bug-1421721-mpx-toggle.t +++ b/tests/bugs/core/bug-1421721-mpx-toggle.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-1432542-mpx-restart-crash.t b/tests/bugs/core/bug-1432542-mpx-restart-crash.t index 2793d7008e1..578ae543705 100644 --- a/tests/bugs/core/bug-1432542-mpx-restart-crash.t +++ b/tests/bugs/core/bug-1432542-mpx-restart-crash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=800 diff --git a/tests/bugs/core/bug-1650403.t b/tests/bugs/core/bug-1650403.t index 43d09bc8bd9..638a27e0374 100644 --- a/tests/bugs/core/bug-1650403.t +++ b/tests/bugs/core/bug-1650403.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=500 diff --git a/tests/bugs/core/bug-1699025-brick-mux-detach-brick-fd-issue.t b/tests/bugs/core/bug-1699025-brick-mux-detach-brick-fd-issue.t index 1acbaa8dc0b..43c522da4d9 100644 --- a/tests/bugs/core/bug-1699025-brick-mux-detach-brick-fd-issue.t +++ b/tests/bugs/core/bug-1699025-brick-mux-detach-brick-fd-issue.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-834465.t b/tests/bugs/core/bug-834465.t index 996248d4116..4d41fb0f9d8 100755 --- a/tests/bugs/core/bug-834465.t +++ b/tests/bugs/core/bug-834465.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-845213.t b/tests/bugs/core/bug-845213.t index 136e4126d14..a81517be2f7 100644 --- a/tests/bugs/core/bug-845213.t +++ b/tests/bugs/core/bug-845213.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/core/bug-903336.t b/tests/bugs/core/bug-903336.t index b52c1a4758e..d04e1c3cacd 100644 --- a/tests/bugs/core/bug-903336.t +++ b/tests/bugs/core/bug-903336.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/core/bug-908146.t b/tests/bugs/core/bug-908146.t index 327be6e54bc..02c16cd8c86 100755 --- a/tests/bugs/core/bug-908146.t +++ b/tests/bugs/core/bug-908146.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-913544.t b/tests/bugs/core/bug-913544.t index af421722590..67cbca3d3cf 100644 --- a/tests/bugs/core/bug-913544.t +++ b/tests/bugs/core/bug-913544.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-924075.t b/tests/bugs/core/bug-924075.t index 61ce0f18286..9910a220ec6 100755 --- a/tests/bugs/core/bug-924075.t +++ b/tests/bugs/core/bug-924075.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/bug-927616.t b/tests/bugs/core/bug-927616.t index 18257131ac7..59fe13ef604 100755 --- a/tests/bugs/core/bug-927616.t +++ b/tests/bugs/core/bug-927616.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/core/bug-949242.t b/tests/bugs/core/bug-949242.t index 5e916cbdbe6..05caaa760ba 100644 --- a/tests/bugs/core/bug-949242.t +++ b/tests/bugs/core/bug-949242.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug 949242 - Test basic fallocate functionality. # diff --git a/tests/bugs/core/bug-986429.t b/tests/bugs/core/bug-986429.t index e512301775f..d422c6af34a 100644 --- a/tests/bugs/core/bug-986429.t +++ b/tests/bugs/core/bug-986429.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/core/io-stats-1322825.t b/tests/bugs/core/io-stats-1322825.t index 53f2d040daa..abecdafa7d2 100755 --- a/tests/bugs/core/io-stats-1322825.t +++ b/tests/bugs/core/io-stats-1322825.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test details: # This is to test that the io-stat-dump xattr is not set on the brick, diff --git a/tests/bugs/core/log-bug-1362520.t b/tests/bugs/core/log-bug-1362520.t index cde854c3349..8233f536e78 100755 --- a/tests/bugs/core/log-bug-1362520.t +++ b/tests/bugs/core/log-bug-1362520.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc #. $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ctime/issue-832.t b/tests/bugs/ctime/issue-832.t index 740f731ab73..c79d5656c24 100755 --- a/tests/bugs/ctime/issue-832.t +++ b/tests/bugs/ctime/issue-832.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1042725.t b/tests/bugs/distribute/bug-1042725.t index 5497eb8bc00..36d43a5a33c 100644 --- a/tests/bugs/distribute/bug-1042725.t +++ b/tests/bugs/distribute/bug-1042725.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1066798.t b/tests/bugs/distribute/bug-1066798.t index 03de970a637..12829140a1a 100755 --- a/tests/bugs/distribute/bug-1066798.t +++ b/tests/bugs/distribute/bug-1066798.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1086228.t b/tests/bugs/distribute/bug-1086228.t index e14ea572b61..77052057f76 100755 --- a/tests/bugs/distribute/bug-1086228.t +++ b/tests/bugs/distribute/bug-1086228.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1088231.t b/tests/bugs/distribute/bug-1088231.t index 8d4d1db73a5..bf12d9ea459 100755 --- a/tests/bugs/distribute/bug-1088231.t +++ b/tests/bugs/distribute/bug-1088231.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../fileio.rc diff --git a/tests/bugs/distribute/bug-1099890.t b/tests/bugs/distribute/bug-1099890.t index 1a19ba880c0..a912c3ee61f 100644 --- a/tests/bugs/distribute/bug-1099890.t +++ b/tests/bugs/distribute/bug-1099890.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1125824.t b/tests/bugs/distribute/bug-1125824.t index 7e401092273..b7d056a6c8c 100755 --- a/tests/bugs/distribute/bug-1125824.t +++ b/tests/bugs/distribute/bug-1125824.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1161156.t b/tests/bugs/distribute/bug-1161156.t index 2b9e15407ca..3e5f623709a 100755 --- a/tests/bugs/distribute/bug-1161156.t +++ b/tests/bugs/distribute/bug-1161156.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1161311.t b/tests/bugs/distribute/bug-1161311.t index 62796068928..7155c643e65 100755 --- a/tests/bugs/distribute/bug-1161311.t +++ b/tests/bugs/distribute/bug-1161311.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=350 diff --git a/tests/bugs/distribute/bug-1190734.t b/tests/bugs/distribute/bug-1190734.t index 9256088f7a0..684a36c959c 100644 --- a/tests/bugs/distribute/bug-1190734.t +++ b/tests/bugs/distribute/bug-1190734.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1193636.t b/tests/bugs/distribute/bug-1193636.t index b377910336e..4b81de2c84e 100644 --- a/tests/bugs/distribute/bug-1193636.t +++ b/tests/bugs/distribute/bug-1193636.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1204140.t b/tests/bugs/distribute/bug-1204140.t index 050c069ea30..18d4f0b8c5d 100755 --- a/tests/bugs/distribute/bug-1204140.t +++ b/tests/bugs/distribute/bug-1204140.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../dht.rc diff --git a/tests/bugs/distribute/bug-1247563.t b/tests/bugs/distribute/bug-1247563.t index a2fc722896f..b1f311224c1 100644 --- a/tests/bugs/distribute/bug-1247563.t +++ b/tests/bugs/distribute/bug-1247563.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1286171.t b/tests/bugs/distribute/bug-1286171.t index a2ca36fa66b..0029ffb57e8 100644 --- a/tests/bugs/distribute/bug-1286171.t +++ b/tests/bugs/distribute/bug-1286171.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/distribute/bug-1368012.t b/tests/bugs/distribute/bug-1368012.t index 0b626353aab..067ca9798b0 100644 --- a/tests/bugs/distribute/bug-1368012.t +++ b/tests/bugs/distribute/bug-1368012.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1389697.t b/tests/bugs/distribute/bug-1389697.t index 0d428b8d9d2..dff48344e4f 100644 --- a/tests/bugs/distribute/bug-1389697.t +++ b/tests/bugs/distribute/bug-1389697.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/distribute/bug-1543279.t b/tests/bugs/distribute/bug-1543279.t index 47b8b4a4a95..b2506b0bbc6 100644 --- a/tests/bugs/distribute/bug-1543279.t +++ b/tests/bugs/distribute/bug-1543279.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1600379.t b/tests/bugs/distribute/bug-1600379.t index 8d2f6154100..8b84dbcf38d 100644 --- a/tests/bugs/distribute/bug-1600379.t +++ b/tests/bugs/distribute/bug-1600379.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1667804.t b/tests/bugs/distribute/bug-1667804.t index 873c3d6a2bc..295af8308d1 100644 --- a/tests/bugs/distribute/bug-1667804.t +++ b/tests/bugs/distribute/bug-1667804.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-1786679.t b/tests/bugs/distribute/bug-1786679.t index 219ce51c8a9..7fb432c7f3a 100755 --- a/tests/bugs/distribute/bug-1786679.t +++ b/tests/bugs/distribute/bug-1786679.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=250 diff --git a/tests/bugs/distribute/bug-853258.t b/tests/bugs/distribute/bug-853258.t index 6817d9e2cd3..201efa3e18a 100755 --- a/tests/bugs/distribute/bug-853258.t +++ b/tests/bugs/distribute/bug-853258.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-860663.t b/tests/bugs/distribute/bug-860663.t index 0042713652c..ad50883f5ef 100644 --- a/tests/bugs/distribute/bug-860663.t +++ b/tests/bugs/distribute/bug-860663.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-862967.t b/tests/bugs/distribute/bug-862967.t index 99a9f90914e..6268383dc71 100644 --- a/tests/bugs/distribute/bug-862967.t +++ b/tests/bugs/distribute/bug-862967.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-882278.t b/tests/bugs/distribute/bug-882278.t index 8cb51474720..5a570147070 100755 --- a/tests/bugs/distribute/bug-882278.t +++ b/tests/bugs/distribute/bug-882278.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-884455.t b/tests/bugs/distribute/bug-884455.t index 59413cd5408..b27e27b2a8b 100755 --- a/tests/bugs/distribute/bug-884455.t +++ b/tests/bugs/distribute/bug-884455.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../dht.rc diff --git a/tests/bugs/distribute/bug-884597.t b/tests/bugs/distribute/bug-884597.t index d6a2c65f370..cabd137e81d 100755 --- a/tests/bugs/distribute/bug-884597.t +++ b/tests/bugs/distribute/bug-884597.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../dht.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-907072.t b/tests/bugs/distribute/bug-907072.t index a4d98831380..50166cd5b4b 100755 --- a/tests/bugs/distribute/bug-907072.t +++ b/tests/bugs/distribute/bug-907072.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../fileio.rc diff --git a/tests/bugs/distribute/bug-912564.t b/tests/bugs/distribute/bug-912564.t index d437728f83b..dd4f6b512e3 100755 --- a/tests/bugs/distribute/bug-912564.t +++ b/tests/bugs/distribute/bug-912564.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test that the rsync and "extra" regexes cause rename-in-place without # creating linkfiles, when they're supposed to. Without the regex we'd have a diff --git a/tests/bugs/distribute/bug-915554.t b/tests/bugs/distribute/bug-915554.t index 9b4f24e8db3..8a38b782abd 100755 --- a/tests/bugs/distribute/bug-915554.t +++ b/tests/bugs/distribute/bug-915554.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug <915554> # diff --git a/tests/bugs/distribute/bug-921408.t b/tests/bugs/distribute/bug-921408.t index 559114bb85a..b315042ee78 100755 --- a/tests/bugs/distribute/bug-921408.t +++ b/tests/bugs/distribute/bug-921408.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../fileio.rc diff --git a/tests/bugs/distribute/bug-924265.t b/tests/bugs/distribute/bug-924265.t index 67c21de97cb..059722fab99 100755 --- a/tests/bugs/distribute/bug-924265.t +++ b/tests/bugs/distribute/bug-924265.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test that setting cluster.dht-xattr-name works, and that DHT consistently # uses the specified name instead of the default. diff --git a/tests/bugs/distribute/bug-961615.t b/tests/bugs/distribute/bug-961615.t index 00938e8fa9b..aa287497d0c 100644 --- a/tests/bugs/distribute/bug-961615.t +++ b/tests/bugs/distribute/bug-961615.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/bug-973073.t b/tests/bugs/distribute/bug-973073.t index cdb785abac0..462b8c9f7b1 100755 --- a/tests/bugs/distribute/bug-973073.t +++ b/tests/bugs/distribute/bug-973073.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../dht.rc diff --git a/tests/bugs/distribute/disallow-fixlayout-on-files.t b/tests/bugs/distribute/disallow-fixlayout-on-files.t index df288e0c56e..5770a6a2463 100644 --- a/tests/bugs/distribute/disallow-fixlayout-on-files.t +++ b/tests/bugs/distribute/disallow-fixlayout-on-files.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/issue-1327.t b/tests/bugs/distribute/issue-1327.t index acd8c8c6614..9dd8aceffa9 100755 --- a/tests/bugs/distribute/issue-1327.t +++ b/tests/bugs/distribute/issue-1327.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SCRIPT_TIMEOUT=250 diff --git a/tests/bugs/distribute/issue-2169.t b/tests/bugs/distribute/issue-2169.t index 91fa72af886..787c7bc3614 100755 --- a/tests/bugs/distribute/issue-2169.t +++ b/tests/bugs/distribute/issue-2169.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/issue-2317.t b/tests/bugs/distribute/issue-2317.t index e29d0039d8a..3632dd10d5a 100755 --- a/tests/bugs/distribute/issue-2317.t +++ b/tests/bugs/distribute/issue-2317.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/distribute/missing-files-rebalance.t b/tests/bugs/distribute/missing-files-rebalance.t index 797e01ae23a..177c7fd8bc9 100644 --- a/tests/bugs/distribute/missing-files-rebalance.t +++ b/tests/bugs/distribute/missing-files-rebalance.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1161621.t b/tests/bugs/ec/bug-1161621.t index 15210bba335..a12260f22fb 100644 --- a/tests/bugs/ec/bug-1161621.t +++ b/tests/bugs/ec/bug-1161621.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../traps.rc diff --git a/tests/bugs/ec/bug-1161886.t b/tests/bugs/ec/bug-1161886.t index e7322210a3e..261abc04489 100644 --- a/tests/bugs/ec/bug-1161886.t +++ b/tests/bugs/ec/bug-1161886.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1179050.t b/tests/bugs/ec/bug-1179050.t index ea2d7b39838..608c5a58bfe 100644 --- a/tests/bugs/ec/bug-1179050.t +++ b/tests/bugs/ec/bug-1179050.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1187474.t b/tests/bugs/ec/bug-1187474.t index e6344c26e73..9e2a15d6d75 100644 --- a/tests/bugs/ec/bug-1187474.t +++ b/tests/bugs/ec/bug-1187474.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1188145.t b/tests/bugs/ec/bug-1188145.t index aa3a59bc62f..834f730de5c 100644 --- a/tests/bugs/ec/bug-1188145.t +++ b/tests/bugs/ec/bug-1188145.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1227869.t b/tests/bugs/ec/bug-1227869.t index 00fad825fae..06649fba3f1 100644 --- a/tests/bugs/ec/bug-1227869.t +++ b/tests/bugs/ec/bug-1227869.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1236065.t b/tests/bugs/ec/bug-1236065.t index d541b577d5c..929006d0a6a 100644 --- a/tests/bugs/ec/bug-1236065.t +++ b/tests/bugs/ec/bug-1236065.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1251446.t b/tests/bugs/ec/bug-1251446.t index 5779c2e973b..a03da30f604 100644 --- a/tests/bugs/ec/bug-1251446.t +++ b/tests/bugs/ec/bug-1251446.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1304988.t b/tests/bugs/ec/bug-1304988.t index 334e5c25932..adeaf2b95a0 100755 --- a/tests/bugs/ec/bug-1304988.t +++ b/tests/bugs/ec/bug-1304988.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1547662.t b/tests/bugs/ec/bug-1547662.t index 5748218587e..b6332784e84 100644 --- a/tests/bugs/ec/bug-1547662.t +++ b/tests/bugs/ec/bug-1547662.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1699866-check-reopen-fd.t b/tests/bugs/ec/bug-1699866-check-reopen-fd.t index 4386d010318..d786a6f134e 100644 --- a/tests/bugs/ec/bug-1699866-check-reopen-fd.t +++ b/tests/bugs/ec/bug-1699866-check-reopen-fd.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/ec/bug-1708156-honor-inodelk-contention-notify-on-partial-locks.t b/tests/bugs/ec/bug-1708156-honor-inodelk-contention-notify-on-partial-locks.t index 67fdb184b46..a056e808247 100644 --- a/tests/bugs/ec/bug-1708156-honor-inodelk-contention-notify-on-partial-locks.t +++ b/tests/bugs/ec/bug-1708156-honor-inodelk-contention-notify-on-partial-locks.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/error-gen/bug-767095.t b/tests/bugs/error-gen/bug-767095.t index 6cc254f559d..e8497be7e3b 100755 --- a/tests/bugs/error-gen/bug-767095.t +++ b/tests/bugs/error-gen/bug-767095.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/fuse/bug-1030208.t b/tests/bugs/fuse/bug-1030208.t index 526283cf101..25541e6f64e 100644 --- a/tests/bugs/fuse/bug-1030208.t +++ b/tests/bugs/fuse/bug-1030208.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test case: Hardlink test diff --git a/tests/bugs/fuse/bug-1126048.t b/tests/bugs/fuse/bug-1126048.t index bf6059c99fb..e49052e224c 100755 --- a/tests/bugs/fuse/bug-1126048.t +++ b/tests/bugs/fuse/bug-1126048.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/fuse/bug-1283103.t b/tests/bugs/fuse/bug-1283103.t index 56612534cb9..012cf08097c 100644 --- a/tests/bugs/fuse/bug-1283103.t +++ b/tests/bugs/fuse/bug-1283103.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # https://bugzilla.redhat.com/show_bug.cgi?id=1283103 diff --git a/tests/bugs/fuse/bug-1309462.t b/tests/bugs/fuse/bug-1309462.t index 975d72d82ed..6978b552a72 100644 --- a/tests/bugs/fuse/bug-1309462.t +++ b/tests/bugs/fuse/bug-1309462.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # https://bugzilla.redhat.com/show_bug.cgi?id=1309462 # Test the new fuse mount option --capability. diff --git a/tests/bugs/fuse/bug-1336818.t b/tests/bugs/fuse/bug-1336818.t index 53286521742..ed2c2381c34 100644 --- a/tests/bugs/fuse/bug-1336818.t +++ b/tests/bugs/fuse/bug-1336818.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test case: OOM score adjust diff --git a/tests/bugs/fuse/bug-858215.t b/tests/bugs/fuse/bug-858215.t index 083582fed1a..7f6217fedd6 100755 --- a/tests/bugs/fuse/bug-858215.t +++ b/tests/bugs/fuse/bug-858215.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/fuse/bug-858488-min-free-disk.t b/tests/bugs/fuse/bug-858488-min-free-disk.t index 635dc04d1e6..99009c98ebc 100644 --- a/tests/bugs/fuse/bug-858488-min-free-disk.t +++ b/tests/bugs/fuse/bug-858488-min-free-disk.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/fuse/bug-924726.t b/tests/bugs/fuse/bug-924726.t index 2d3c7680798..02afcd25ad5 100755 --- a/tests/bugs/fuse/bug-924726.t +++ b/tests/bugs/fuse/bug-924726.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash TESTS_EXPECTED_IN_LOOP=10 diff --git a/tests/bugs/fuse/bug-963678.t b/tests/bugs/fuse/bug-963678.t index 006181f26e1..950344dddd2 100644 --- a/tests/bugs/fuse/bug-963678.t +++ b/tests/bugs/fuse/bug-963678.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug 963678 - Test discard functionality # diff --git a/tests/bugs/fuse/bug-983477.t b/tests/bugs/fuse/bug-983477.t index 41ddd9e55a9..dfcddb9fb4f 100755 --- a/tests/bugs/fuse/bug-983477.t +++ b/tests/bugs/fuse/bug-983477.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/fuse/bug-985074.t b/tests/bugs/fuse/bug-985074.t index ffa6df54144..e34ae2b33d4 100644 --- a/tests/bugs/fuse/bug-985074.t +++ b/tests/bugs/fuse/bug-985074.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug 985074 - Verify stale inode/dentry mappings are cleaned out. # diff --git a/tests/bugs/fuse/many-groups-for-acl.t b/tests/bugs/fuse/many-groups-for-acl.t index d847c32fc9b..6be9f9c653b 100755 --- a/tests/bugs/fuse/many-groups-for-acl.t +++ b/tests/bugs/fuse/many-groups-for-acl.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/fuse/setup.sh b/tests/bugs/fuse/setup.sh index d44d8dba027..99178ef6562 100755 --- a/tests/bugs/fuse/setup.sh +++ b/tests/bugs/fuse/setup.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash -. $(dirname $0)/../../include.rc +. "$(dirname $0)"/../../include.rc #. $(dirname $0)/../../volume.rc cleanup; @@ -11,10 +11,10 @@ TEST pidof glusterd TEST $CLI volume info #Create a distributed volume -TEST $CLI volume create $V0 $H0:$B0/${V0}{1..2}; -TEST $CLI volume start $V0 +TEST $CLI volume create "$V0" "$H0":"$B0"/"${V0}"{1..2}; +TEST $CLI volume start "$V0" # Mount FUSE without selinux: -TEST glusterfs -s $H0 --volfile-id $V0 $@ $M0 +TEST glusterfs -s "$H0" --volfile-id "$V0" "$@" "$M0" echo "Gluster started and volume '$V0' mounted under '$M0'" diff --git a/tests/bugs/fuse/teardown.sh b/tests/bugs/fuse/teardown.sh index 5d57974e1f9..7b10554c44e 100755 --- a/tests/bugs/fuse/teardown.sh +++ b/tests/bugs/fuse/teardown.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/geo-replication/bug-1111490.t b/tests/bugs/geo-replication/bug-1111490.t index 9686fb5a0ef..a82e839b52b 100644 --- a/tests/bugs/geo-replication/bug-1111490.t +++ b/tests/bugs/geo-replication/bug-1111490.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/geo-replication/bug-1296496.t b/tests/bugs/geo-replication/bug-1296496.t index bf86703a7e0..87c4d0dd76f 100644 --- a/tests/bugs/geo-replication/bug-1296496.t +++ b/tests/bugs/geo-replication/bug-1296496.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/geo-replication/bug-877293.t b/tests/bugs/geo-replication/bug-877293.t index c5205e8109e..d393a7436c3 100755 --- a/tests/bugs/geo-replication/bug-877293.t +++ b/tests/bugs/geo-replication/bug-877293.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/gfapi/bug-1032894.t b/tests/bugs/gfapi/bug-1032894.t index 88d110136e2..3cead834023 100644 --- a/tests/bugs/gfapi/bug-1032894.t +++ b/tests/bugs/gfapi/bug-1032894.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/gfapi/bug-1093594.t b/tests/bugs/gfapi/bug-1093594.t index 0c220b3b007..e5e4ca58bee 100755 --- a/tests/bugs/gfapi/bug-1093594.t +++ b/tests/bugs/gfapi/bug-1093594.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/gfapi/bug-1319374-THIS-crash.t b/tests/bugs/gfapi/bug-1319374-THIS-crash.t index 8d3db421c88..ab2f507e26e 100755 --- a/tests/bugs/gfapi/bug-1319374-THIS-crash.t +++ b/tests/bugs/gfapi/bug-1319374-THIS-crash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/gfapi/bug-1447266/1460514.t b/tests/bugs/gfapi/bug-1447266/1460514.t index 594af75cae2..29a18c8b0de 100644 --- a/tests/bugs/gfapi/bug-1447266/1460514.t +++ b/tests/bugs/gfapi/bug-1447266/1460514.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/gfapi/bug-1447266/bug-1447266.t b/tests/bugs/gfapi/bug-1447266/bug-1447266.t index 45547f4f0e7..40727549b64 100644 --- a/tests/bugs/gfapi/bug-1447266/bug-1447266.t +++ b/tests/bugs/gfapi/bug-1447266/bug-1447266.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/gfapi/bug-1630804/gfapi-bz1630804.t b/tests/bugs/gfapi/bug-1630804/gfapi-bz1630804.t index ac59aeeb47b..3483c55994d 100644 --- a/tests/bugs/gfapi/bug-1630804/gfapi-bz1630804.t +++ b/tests/bugs/gfapi/bug-1630804/gfapi-bz1630804.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/gfapi/glfs_vol_set_IO_ERR.t b/tests/bugs/gfapi/glfs_vol_set_IO_ERR.t index 5893ef273bd..91f940a6827 100755 --- a/tests/bugs/gfapi/glfs_vol_set_IO_ERR.t +++ b/tests/bugs/gfapi/glfs_vol_set_IO_ERR.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/859927/repl.t b/tests/bugs/glusterd/859927/repl.t index 6e7c23b5b1d..c9eda8561ef 100755 --- a/tests/bugs/glusterd/859927/repl.t +++ b/tests/bugs/glusterd/859927/repl.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/glusterd/add-brick-and-validate-replicated-volume-options.t b/tests/bugs/glusterd/add-brick-and-validate-replicated-volume-options.t index 95d0eb69ac1..1609988e93c 100644 --- a/tests/bugs/glusterd/add-brick-and-validate-replicated-volume-options.t +++ b/tests/bugs/glusterd/add-brick-and-validate-replicated-volume-options.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/brick-mux-validation-in-cluster.t b/tests/bugs/glusterd/brick-mux-validation-in-cluster.t index b6af487a791..290cdc61895 100644 --- a/tests/bugs/glusterd/brick-mux-validation-in-cluster.t +++ b/tests/bugs/glusterd/brick-mux-validation-in-cluster.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/brick-mux-validation.t b/tests/bugs/glusterd/brick-mux-validation.t index 61b0455f9a8..6a9556dbe0c 100644 --- a/tests/bugs/glusterd/brick-mux-validation.t +++ b/tests/bugs/glusterd/brick-mux-validation.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../traps.rc diff --git a/tests/bugs/glusterd/brick-mux.t b/tests/bugs/glusterd/brick-mux.t index 358d8d5c3c1..4646e8c00de 100644 --- a/tests/bugs/glusterd/brick-mux.t +++ b/tests/bugs/glusterd/brick-mux.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/brick-order-check-add-brick.t b/tests/bugs/glusterd/brick-order-check-add-brick.t index 515749cdd04..7fb4cd9a73b 100644 --- a/tests/bugs/glusterd/brick-order-check-add-brick.t +++ b/tests/bugs/glusterd/brick-order-check-add-brick.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/bug-1070734.t b/tests/bugs/glusterd/bug-1070734.t index 0afcb3b37b3..0a1f9ead64e 100755 --- a/tests/bugs/glusterd/bug-1070734.t +++ b/tests/bugs/glusterd/bug-1070734.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1085330-and-bug-916549.t b/tests/bugs/glusterd/bug-1085330-and-bug-916549.t index 892a30d74ea..87725eb33df 100644 --- a/tests/bugs/glusterd/bug-1085330-and-bug-916549.t +++ b/tests/bugs/glusterd/bug-1085330-and-bug-916549.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1091935-brick-order-check-from-cli-to-glusterd.t b/tests/bugs/glusterd/bug-1091935-brick-order-check-from-cli-to-glusterd.t index 9ac9d8fedd9..942fac0939b 100755 --- a/tests/bugs/glusterd/bug-1091935-brick-order-check-from-cli-to-glusterd.t +++ b/tests/bugs/glusterd/bug-1091935-brick-order-check-from-cli-to-glusterd.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t b/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t index 7be076caaf3..022b2d34cce 100644 --- a/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t +++ b/tests/bugs/glusterd/bug-1238706-daemons-stop-on-peer-cleanup.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Test case for stopping all running daemons service on peer detach. diff --git a/tests/bugs/glusterd/bug-1242875-do-not-pass-volinfo-quota.t b/tests/bugs/glusterd/bug-1242875-do-not-pass-volinfo-quota.t index c229d4371b6..3d74efa343f 100644 --- a/tests/bugs/glusterd/bug-1242875-do-not-pass-volinfo-quota.t +++ b/tests/bugs/glusterd/bug-1242875-do-not-pass-volinfo-quota.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1482906-peer-file-blank-line.t b/tests/bugs/glusterd/bug-1482906-peer-file-blank-line.t index 967595e4dbb..544df6b0138 100644 --- a/tests/bugs/glusterd/bug-1482906-peer-file-blank-line.t +++ b/tests/bugs/glusterd/bug-1482906-peer-file-blank-line.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/bug-1595320.t b/tests/bugs/glusterd/bug-1595320.t index d27300ac181..0049d767901 100644 --- a/tests/bugs/glusterd/bug-1595320.t +++ b/tests/bugs/glusterd/bug-1595320.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1696046.t b/tests/bugs/glusterd/bug-1696046.t index e1c1eb2ceb9..210fad6d3d3 100644 --- a/tests/bugs/glusterd/bug-1696046.t +++ b/tests/bugs/glusterd/bug-1696046.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1699339.t b/tests/bugs/glusterd/bug-1699339.t index bb8d4f46eb8..b797c038dfd 100644 --- a/tests/bugs/glusterd/bug-1699339.t +++ b/tests/bugs/glusterd/bug-1699339.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/bug-1720566.t b/tests/bugs/glusterd/bug-1720566.t index 44e32a5884e..ee23e2b9272 100644 --- a/tests/bugs/glusterd/bug-1720566.t +++ b/tests/bugs/glusterd/bug-1720566.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/bug-824753.t b/tests/bugs/glusterd/bug-824753.t index a17de0b31bf..b01ed725c5c 100755 --- a/tests/bugs/glusterd/bug-824753.t +++ b/tests/bugs/glusterd/bug-824753.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterd/bug-948729/bug-948729-force.t b/tests/bugs/glusterd/bug-948729/bug-948729-force.t index 90494e8dd4b..9b7d24e0852 100644 --- a/tests/bugs/glusterd/bug-948729/bug-948729-force.t +++ b/tests/bugs/glusterd/bug-948729/bug-948729-force.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/glusterd/bug-948729/bug-948729-mode-script.t b/tests/bugs/glusterd/bug-948729/bug-948729-mode-script.t index 95ef5310de6..069c5c9146b 100644 --- a/tests/bugs/glusterd/bug-948729/bug-948729-mode-script.t +++ b/tests/bugs/glusterd/bug-948729/bug-948729-mode-script.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/glusterd/bug-948729/bug-948729.t b/tests/bugs/glusterd/bug-948729/bug-948729.t index 21264d53dbd..8941948f710 100644 --- a/tests/bugs/glusterd/bug-948729/bug-948729.t +++ b/tests/bugs/glusterd/bug-948729/bug-948729.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/glusterd/bug-949930.t b/tests/bugs/glusterd/bug-949930.t index 9a6d38fa37f..91426e76f25 100644 --- a/tests/bugs/glusterd/bug-949930.t +++ b/tests/bugs/glusterd/bug-949930.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/check_elastic_server.t b/tests/bugs/glusterd/check_elastic_server.t index 41d2140aa2b..6262c94a7dc 100644 --- a/tests/bugs/glusterd/check_elastic_server.t +++ b/tests/bugs/glusterd/check_elastic_server.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/daemon-log-level-option.t b/tests/bugs/glusterd/daemon-log-level-option.t index 477a77cfbd8..87dfe2cb4d9 100644 --- a/tests/bugs/glusterd/daemon-log-level-option.t +++ b/tests/bugs/glusterd/daemon-log-level-option.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/df-results-post-replace-brick-operations.t b/tests/bugs/glusterd/df-results-post-replace-brick-operations.t index 97c96eedd1a..69870c99739 100644 --- a/tests/bugs/glusterd/df-results-post-replace-brick-operations.t +++ b/tests/bugs/glusterd/df-results-post-replace-brick-operations.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/issue-3781.t b/tests/bugs/glusterd/issue-3781.t index c85b0e3b605..503a03c6f3c 100644 --- a/tests/bugs/glusterd/issue-3781.t +++ b/tests/bugs/glusterd/issue-3781.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t b/tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t index 8001359e6b3..236f29a7b73 100644 --- a/tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t +++ b/tests/bugs/glusterd/mgmt-handshake-and-volume-sync-post-glusterd-restart.t @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t b/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t index 99272e14245..cada4ab6349 100644 --- a/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t +++ b/tests/bugs/glusterd/optimized-basic-testcases-in-cluster.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/optimized-basic-testcases.t b/tests/bugs/glusterd/optimized-basic-testcases.t index b89ca22415e..45afca4783b 100644 --- a/tests/bugs/glusterd/optimized-basic-testcases.t +++ b/tests/bugs/glusterd/optimized-basic-testcases.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/quorum-validation.t b/tests/bugs/glusterd/quorum-validation.t index 3cc3351b43b..30651cb08c8 100644 --- a/tests/bugs/glusterd/quorum-validation.t +++ b/tests/bugs/glusterd/quorum-validation.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/rebalance-in-cluster.t b/tests/bugs/glusterd/rebalance-in-cluster.t index 469ec6cd48e..d7b570dd950 100644 --- a/tests/bugs/glusterd/rebalance-in-cluster.t +++ b/tests/bugs/glusterd/rebalance-in-cluster.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/rebalance-operations-in-single-node.t b/tests/bugs/glusterd/rebalance-operations-in-single-node.t index 6b6f0177aae..936fa9087f9 100644 --- a/tests/bugs/glusterd/rebalance-operations-in-single-node.t +++ b/tests/bugs/glusterd/rebalance-operations-in-single-node.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/remove-brick-in-cluster.t b/tests/bugs/glusterd/remove-brick-in-cluster.t index de94220a906..0f57defb605 100644 --- a/tests/bugs/glusterd/remove-brick-in-cluster.t +++ b/tests/bugs/glusterd/remove-brick-in-cluster.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/remove-brick-testcases.t b/tests/bugs/glusterd/remove-brick-testcases.t index 2f982d5266f..3e9e68dd50e 100644 --- a/tests/bugs/glusterd/remove-brick-testcases.t +++ b/tests/bugs/glusterd/remove-brick-testcases.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/remove-brick-validation.t b/tests/bugs/glusterd/remove-brick-validation.t index a0ff4ff6a24..380eec3da29 100644 --- a/tests/bugs/glusterd/remove-brick-validation.t +++ b/tests/bugs/glusterd/remove-brick-validation.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/removing-multiple-bricks-in-single-remove-brick-command.t b/tests/bugs/glusterd/removing-multiple-bricks-in-single-remove-brick-command.t index 00beab59137..8b7cff464a7 100644 --- a/tests/bugs/glusterd/removing-multiple-bricks-in-single-remove-brick-command.t +++ b/tests/bugs/glusterd/removing-multiple-bricks-in-single-remove-brick-command.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/replace-brick-operations.t b/tests/bugs/glusterd/replace-brick-operations.t index c8b6596903d..05a2f958231 100644 --- a/tests/bugs/glusterd/replace-brick-operations.t +++ b/tests/bugs/glusterd/replace-brick-operations.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Test case for BZ: 1094119 Remove replace-brick support from gluster diff --git a/tests/bugs/glusterd/reset-brick-and-daemons-follow-quorum.t b/tests/bugs/glusterd/reset-brick-and-daemons-follow-quorum.t index e6e65c48456..d78daddb4b7 100644 --- a/tests/bugs/glusterd/reset-brick-and-daemons-follow-quorum.t +++ b/tests/bugs/glusterd/reset-brick-and-daemons-follow-quorum.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/reset-rebalance-state.t b/tests/bugs/glusterd/reset-rebalance-state.t index 829d2b12b6c..43b8a6f0221 100644 --- a/tests/bugs/glusterd/reset-rebalance-state.t +++ b/tests/bugs/glusterd/reset-rebalance-state.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/serialize-shd-manager-glusterd-restart.t b/tests/bugs/glusterd/serialize-shd-manager-glusterd-restart.t index a871e112d87..7b95e6a3523 100644 --- a/tests/bugs/glusterd/serialize-shd-manager-glusterd-restart.t +++ b/tests/bugs/glusterd/serialize-shd-manager-glusterd-restart.t @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/snapshot-operations.t b/tests/bugs/glusterd/snapshot-operations.t index 844e150d67d..62a182ee5e6 100644 --- a/tests/bugs/glusterd/snapshot-operations.t +++ b/tests/bugs/glusterd/snapshot-operations.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/sync-post-glusterd-restart.t b/tests/bugs/glusterd/sync-post-glusterd-restart.t index de3dff715ab..23fe8918dd2 100644 --- a/tests/bugs/glusterd/sync-post-glusterd-restart.t +++ b/tests/bugs/glusterd/sync-post-glusterd-restart.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/glusterd/validating-options-for-replicated-volume.t b/tests/bugs/glusterd/validating-options-for-replicated-volume.t index ddc80b17870..7d0c6c1b92c 100644 --- a/tests/bugs/glusterd/validating-options-for-replicated-volume.t +++ b/tests/bugs/glusterd/validating-options-for-replicated-volume.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterd/validating-server-quorum.t b/tests/bugs/glusterd/validating-server-quorum.t index ae7d83fd81c..e52f5b10a49 100644 --- a/tests/bugs/glusterd/validating-server-quorum.t +++ b/tests/bugs/glusterd/validating-server-quorum.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs-server/bug-852147.t b/tests/bugs/glusterfs-server/bug-852147.t index 75db2a26e05..59180ed6096 100755 --- a/tests/bugs/glusterfs-server/bug-852147.t +++ b/tests/bugs/glusterfs-server/bug-852147.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs-server/bug-861542.t b/tests/bugs/glusterfs-server/bug-861542.t index 60d1b132fb4..873bace9e57 100755 --- a/tests/bugs/glusterfs-server/bug-861542.t +++ b/tests/bugs/glusterfs-server/bug-861542.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterfs-server/bug-864222.t b/tests/bugs/glusterfs-server/bug-864222.t index 01a7a4e3afd..6d588da2564 100755 --- a/tests/bugs/glusterfs-server/bug-864222.t +++ b/tests/bugs/glusterfs-server/bug-864222.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/glusterfs-server/bug-873549.t b/tests/bugs/glusterfs-server/bug-873549.t index 8b5534728fd..b129c3dc8e3 100644 --- a/tests/bugs/glusterfs-server/bug-873549.t +++ b/tests/bugs/glusterfs-server/bug-873549.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterfs-server/bug-877992.t b/tests/bugs/glusterfs-server/bug-877992.t index 300000bcf2c..4063cbaa8fe 100755 --- a/tests/bugs/glusterfs-server/bug-877992.t +++ b/tests/bugs/glusterfs-server/bug-877992.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterfs-server/bug-887145.t b/tests/bugs/glusterfs-server/bug-887145.t index db2cf3c050b..2869db50f9b 100755 --- a/tests/bugs/glusterfs-server/bug-887145.t +++ b/tests/bugs/glusterfs-server/bug-887145.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/glusterfs-server/bug-889996.t b/tests/bugs/glusterfs-server/bug-889996.t index d7d25c42933..f8bb20140c7 100644 --- a/tests/bugs/glusterfs-server/bug-889996.t +++ b/tests/bugs/glusterfs-server/bug-889996.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs-server/bug-904300.t b/tests/bugs/glusterfs-server/bug-904300.t index 95d5d381c8b..65bb2c85e2a 100755 --- a/tests/bugs/glusterfs-server/bug-904300.t +++ b/tests/bugs/glusterfs-server/bug-904300.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/glusterfs-server/bug-905864.t b/tests/bugs/glusterfs-server/bug-905864.t index 44923a85333..e97b5ab0781 100644 --- a/tests/bugs/glusterfs-server/bug-905864.t +++ b/tests/bugs/glusterfs-server/bug-905864.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs-server/bug-912297.t b/tests/bugs/glusterfs-server/bug-912297.t index 08f5dcea9b9..ddab838cac8 100755 --- a/tests/bugs/glusterfs-server/bug-912297.t +++ b/tests/bugs/glusterfs-server/bug-912297.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-1482528.t b/tests/bugs/glusterfs/bug-1482528.t index 3adf260bdcd..33e4bfe61b8 100644 --- a/tests/bugs/glusterfs/bug-1482528.t +++ b/tests/bugs/glusterfs/bug-1482528.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-811493.t b/tests/bugs/glusterfs/bug-811493.t index 98f7c121a02..a98a8a7eef2 100755 --- a/tests/bugs/glusterfs/bug-811493.t +++ b/tests/bugs/glusterfs/bug-811493.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterfs/bug-844688.t b/tests/bugs/glusterfs/bug-844688.t index 65f41b342a5..da605606f88 100755 --- a/tests/bugs/glusterfs/bug-844688.t +++ b/tests/bugs/glusterfs/bug-844688.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-848251.t b/tests/bugs/glusterfs/bug-848251.t index 69ffe680f7f..58a7bfbf358 100644 --- a/tests/bugs/glusterfs/bug-848251.t +++ b/tests/bugs/glusterfs/bug-848251.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-853690.t b/tests/bugs/glusterfs/bug-853690.t index 59facfcddb0..6db5f2b35f5 100755 --- a/tests/bugs/glusterfs/bug-853690.t +++ b/tests/bugs/glusterfs/bug-853690.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug 853690 - Test that short writes do not lead to corruption. # diff --git a/tests/bugs/glusterfs/bug-856455.t b/tests/bugs/glusterfs/bug-856455.t index d02b39bda8e..431d78cb796 100644 --- a/tests/bugs/glusterfs/bug-856455.t +++ b/tests/bugs/glusterfs/bug-856455.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-860297.t b/tests/bugs/glusterfs/bug-860297.t index c2d21553f68..02c1738d581 100644 --- a/tests/bugs/glusterfs/bug-860297.t +++ b/tests/bugs/glusterfs/bug-860297.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc cleanup; diff --git a/tests/bugs/glusterfs/bug-861015-index.t b/tests/bugs/glusterfs/bug-861015-index.t index 7595be6451e..d41df6c323b 100644 --- a/tests/bugs/glusterfs/bug-861015-index.t +++ b/tests/bugs/glusterfs/bug-861015-index.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-861015-log.t b/tests/bugs/glusterfs/bug-861015-log.t index 2f3e0ad14f4..b436abd246d 100644 --- a/tests/bugs/glusterfs/bug-861015-log.t +++ b/tests/bugs/glusterfs/bug-861015-log.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-866459.t b/tests/bugs/glusterfs/bug-866459.t index 62f1afcb34d..bf04b7895e9 100644 --- a/tests/bugs/glusterfs/bug-866459.t +++ b/tests/bugs/glusterfs/bug-866459.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-867253.t b/tests/bugs/glusterfs/bug-867253.t index 8c3c39baace..73d5de2f23f 100644 --- a/tests/bugs/glusterfs/bug-867253.t +++ b/tests/bugs/glusterfs/bug-867253.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-869724.t b/tests/bugs/glusterfs/bug-869724.t index d425ae07f5f..0f26f064ff3 100644 --- a/tests/bugs/glusterfs/bug-869724.t +++ b/tests/bugs/glusterfs/bug-869724.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-872923.t b/tests/bugs/glusterfs/bug-872923.t index 00e02c89cbe..d1dcb192ef7 100755 --- a/tests/bugs/glusterfs/bug-872923.t +++ b/tests/bugs/glusterfs/bug-872923.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-873962-spb.t b/tests/bugs/glusterfs/bug-873962-spb.t index db71cc0f6fe..8e523076eb6 100644 --- a/tests/bugs/glusterfs/bug-873962-spb.t +++ b/tests/bugs/glusterfs/bug-873962-spb.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-873962.t b/tests/bugs/glusterfs/bug-873962.t index 7faa9998159..219e8cd4759 100755 --- a/tests/bugs/glusterfs/bug-873962.t +++ b/tests/bugs/glusterfs/bug-873962.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #AFR TEST-IDENTIFIER SPLIT-BRAIN . $(dirname $0)/../../include.rc diff --git a/tests/bugs/glusterfs/bug-879490.t b/tests/bugs/glusterfs/bug-879490.t index fb8d4263919..c654891b466 100755 --- a/tests/bugs/glusterfs/bug-879490.t +++ b/tests/bugs/glusterfs/bug-879490.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-879494.t b/tests/bugs/glusterfs/bug-879494.t index 12ee466b33a..d66641888d7 100755 --- a/tests/bugs/glusterfs/bug-879494.t +++ b/tests/bugs/glusterfs/bug-879494.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-892730.t b/tests/bugs/glusterfs/bug-892730.t index a76961134c5..d21f1b7349a 100755 --- a/tests/bugs/glusterfs/bug-892730.t +++ b/tests/bugs/glusterfs/bug-892730.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Bug 892730 - Verify that afr handles EIO errors from the brick properly. # diff --git a/tests/bugs/glusterfs/bug-893338.t b/tests/bugs/glusterfs/bug-893338.t index b915d3e791e..9645e481531 100644 --- a/tests/bugs/glusterfs/bug-893338.t +++ b/tests/bugs/glusterfs/bug-893338.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-893378.t b/tests/bugs/glusterfs/bug-893378.t index 444dafb44bc..16aca06437c 100755 --- a/tests/bugs/glusterfs/bug-893378.t +++ b/tests/bugs/glusterfs/bug-893378.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-895235.t b/tests/bugs/glusterfs/bug-895235.t index e65185bb3a4..cf847d228cb 100644 --- a/tests/bugs/glusterfs/bug-895235.t +++ b/tests/bugs/glusterfs/bug-895235.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-896431.t b/tests/bugs/glusterfs/bug-896431.t index 61f71141713..ef04c4488ec 100755 --- a/tests/bugs/glusterfs/bug-896431.t +++ b/tests/bugs/glusterfs/bug-896431.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-902610.t b/tests/bugs/glusterfs/bug-902610.t index 112c947e116..e8558003a7a 100755 --- a/tests/bugs/glusterfs/bug-902610.t +++ b/tests/bugs/glusterfs/bug-902610.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/glusterfs/bug-906646.t b/tests/bugs/glusterfs/bug-906646.t index 37b8fe5c8eb..76dcb9823cc 100644 --- a/tests/bugs/glusterfs/bug-906646.t +++ b/tests/bugs/glusterfs/bug-906646.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/heal-symlinks.t b/tests/bugs/heal-symlinks.t index e3040302561..dc2dcb8bbc8 100644 --- a/tests/bugs/heal-symlinks.t +++ b/tests/bugs/heal-symlinks.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc . $(dirname $0)/../afr.rc diff --git a/tests/bugs/index/bug-1559004-EMLINK-handling.t b/tests/bugs/index/bug-1559004-EMLINK-handling.t index 5596fa56c4c..20994bc56e6 100644 --- a/tests/bugs/index/bug-1559004-EMLINK-handling.t +++ b/tests/bugs/index/bug-1559004-EMLINK-handling.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/io-cache/bug-858242.t b/tests/bugs/io-cache/bug-858242.t index bd881872f55..c3033c6a0e2 100755 --- a/tests/bugs/io-cache/bug-858242.t +++ b/tests/bugs/io-cache/bug-858242.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/io-cache/bug-read-hang.t b/tests/bugs/io-cache/bug-read-hang.t index f8efe281723..3ad2617176d 100755 --- a/tests/bugs/io-cache/bug-read-hang.t +++ b/tests/bugs/io-cache/bug-read-hang.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc #. $(dirname $0)/../../volume.rc diff --git a/tests/bugs/io-stats/bug-1598548.t b/tests/bugs/io-stats/bug-1598548.t index 19b0c053d08..3bab4aff1b8 100755 --- a/tests/bugs/io-stats/bug-1598548.t +++ b/tests/bugs/io-stats/bug-1598548.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/locks/issue-2443-crash.t b/tests/bugs/locks/issue-2443-crash.t index 162a4d7b150..5a289d992fe 100644 --- a/tests/bugs/locks/issue-2443-crash.t +++ b/tests/bugs/locks/issue-2443-crash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/locks/issue-2551.t b/tests/bugs/locks/issue-2551.t index a32af02e33c..43fa9fdce9e 100644 --- a/tests/bugs/locks/issue-2551.t +++ b/tests/bugs/locks/issue-2551.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/logging/bug-823081.t b/tests/bugs/logging/bug-823081.t index bd1965d2d49..6b2be2739ab 100755 --- a/tests/bugs/logging/bug-823081.t +++ b/tests/bugs/logging/bug-823081.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/md-cache/afr-stale-read.t b/tests/bugs/md-cache/afr-stale-read.t index 7cee5afe27e..4c1b58a5f2d 100755 --- a/tests/bugs/md-cache/afr-stale-read.t +++ b/tests/bugs/md-cache/afr-stale-read.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc #. $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/bug-1211863.t b/tests/bugs/md-cache/bug-1211863.t index ba9bde9fee8..224156ae7bc 100755 --- a/tests/bugs/md-cache/bug-1211863.t +++ b/tests/bugs/md-cache/bug-1211863.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/bug-1211863_unlink.t b/tests/bugs/md-cache/bug-1211863_unlink.t index 34392ed919f..3665bfbf296 100755 --- a/tests/bugs/md-cache/bug-1211863_unlink.t +++ b/tests/bugs/md-cache/bug-1211863_unlink.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/bug-1476324.t b/tests/bugs/md-cache/bug-1476324.t index c34f412a15e..4bda32cd8b5 100644 --- a/tests/bugs/md-cache/bug-1476324.t +++ b/tests/bugs/md-cache/bug-1476324.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/bug-1632503.t b/tests/bugs/md-cache/bug-1632503.t index aeb57f65639..69383fa1c99 100755 --- a/tests/bugs/md-cache/bug-1632503.t +++ b/tests/bugs/md-cache/bug-1632503.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/bug-1726205.t b/tests/bugs/md-cache/bug-1726205.t index 795130e9bd8..dbfa93dab86 100644 --- a/tests/bugs/md-cache/bug-1726205.t +++ b/tests/bugs/md-cache/bug-1726205.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/md-cache/setxattr-prepoststat.t b/tests/bugs/md-cache/setxattr-prepoststat.t index 01fa768299c..5cb6855a268 100755 --- a/tests/bugs/md-cache/setxattr-prepoststat.t +++ b/tests/bugs/md-cache/setxattr-prepoststat.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/bug-1053579.t b/tests/bugs/nfs/bug-1053579.t index ece246e86ce..d48a97d39ab 100755 --- a/tests/bugs/nfs/bug-1053579.t +++ b/tests/bugs/nfs/bug-1053579.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/bug-1143880-fix-gNFSd-auth-crash.t b/tests/bugs/nfs/bug-1143880-fix-gNFSd-auth-crash.t index c360db4c91c..c52999c3abd 100644 --- a/tests/bugs/nfs/bug-1143880-fix-gNFSd-auth-crash.t +++ b/tests/bugs/nfs/bug-1143880-fix-gNFSd-auth-crash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/nfs/bug-1157223-symlink-mounting.t b/tests/bugs/nfs/bug-1157223-symlink-mounting.t index dea609ed193..ad0a9ab75e6 100644 --- a/tests/bugs/nfs/bug-1157223-symlink-mounting.t +++ b/tests/bugs/nfs/bug-1157223-symlink-mounting.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/nfs/bug-1161092-nfs-acls.t b/tests/bugs/nfs/bug-1161092-nfs-acls.t index 1e314c9d5f6..2e86e0f3b4f 100644 --- a/tests/bugs/nfs/bug-1161092-nfs-acls.t +++ b/tests/bugs/nfs/bug-1161092-nfs-acls.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/bug-1166862.t b/tests/bugs/nfs/bug-1166862.t index c4f51a2d446..273a432b43b 100755 --- a/tests/bugs/nfs/bug-1166862.t +++ b/tests/bugs/nfs/bug-1166862.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # When nfs.mount-rmtab is disabled, it should not get updated. # diff --git a/tests/bugs/nfs/bug-1210338.t b/tests/bugs/nfs/bug-1210338.t index b5c9245affd..adc73e3858c 100644 --- a/tests/bugs/nfs/bug-1210338.t +++ b/tests/bugs/nfs/bug-1210338.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/bug-1302948.t b/tests/bugs/nfs/bug-1302948.t index a2fb0e68ff0..a9da0a19fa4 100755 --- a/tests/bugs/nfs/bug-1302948.t +++ b/tests/bugs/nfs/bug-1302948.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # TEST the nfs.rdirplus option . $(dirname $0)/../../include.rc diff --git a/tests/bugs/nfs/bug-847622.t b/tests/bugs/nfs/bug-847622.t index 5ccee722ed9..8b93f22f5fb 100755 --- a/tests/bugs/nfs/bug-847622.t +++ b/tests/bugs/nfs/bug-847622.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/nfs/bug-877885.t b/tests/bugs/nfs/bug-877885.t index dca315a3d01..32b9e936834 100755 --- a/tests/bugs/nfs/bug-877885.t +++ b/tests/bugs/nfs/bug-877885.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/nfs/bug-904065.t b/tests/bugs/nfs/bug-904065.t index 0eba86e7ee8..ac9ee6a5773 100755 --- a/tests/bugs/nfs/bug-904065.t +++ b/tests/bugs/nfs/bug-904065.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This test does not use 'showmount' from the nfs-utils package, it would # require setting up a portmapper (either rpcbind or portmap, depending on the diff --git a/tests/bugs/nfs/bug-915280.t b/tests/bugs/nfs/bug-915280.t index bd279157c25..0f951160469 100755 --- a/tests/bugs/nfs/bug-915280.t +++ b/tests/bugs/nfs/bug-915280.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/bug-970070.t b/tests/bugs/nfs/bug-970070.t index 61be4844e51..e6571770714 100755 --- a/tests/bugs/nfs/bug-970070.t +++ b/tests/bugs/nfs/bug-970070.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # TEST the nfs.acl option . $(dirname $0)/../../include.rc diff --git a/tests/bugs/nfs/bug-974972.t b/tests/bugs/nfs/bug-974972.t index 975c46f85a4..265a4e605ae 100755 --- a/tests/bugs/nfs/bug-974972.t +++ b/tests/bugs/nfs/bug-974972.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/showmount-many-clients.t b/tests/bugs/nfs/showmount-many-clients.t index c6c9c35d60a..fd439eb6d69 100644 --- a/tests/bugs/nfs/showmount-many-clients.t +++ b/tests/bugs/nfs/showmount-many-clients.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # The nfs.rpc-auth-allow volume option is used to generate the list of clients # that are displayed as able to mount the export. The "group" in the export diff --git a/tests/bugs/nfs/socket-as-fifo.t b/tests/bugs/nfs/socket-as-fifo.t index d9b9e959ce3..6222999a69c 100644 --- a/tests/bugs/nfs/socket-as-fifo.t +++ b/tests/bugs/nfs/socket-as-fifo.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/nfs/subdir-trailing-slash.t b/tests/bugs/nfs/subdir-trailing-slash.t index 6a114877ac7..3ffb00b9efd 100644 --- a/tests/bugs/nfs/subdir-trailing-slash.t +++ b/tests/bugs/nfs/subdir-trailing-slash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Verify that mounting a subdir over NFS works, even with a trailing / # diff --git a/tests/bugs/nfs/zero-atime.t b/tests/bugs/nfs/zero-atime.t index 2a940091ad9..f6934ee5ed6 100755 --- a/tests/bugs/nfs/zero-atime.t +++ b/tests/bugs/nfs/zero-atime.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # posix_do_utimes() sets atime and mtime to the values in the passed IATT. If # not set, these values are 0 and cause a atime/mtime set to the Epoch. diff --git a/tests/bugs/nl-cache/bug-1451588.t b/tests/bugs/nl-cache/bug-1451588.t index cf07d04c5cc..e0b36be672d 100755 --- a/tests/bugs/nl-cache/bug-1451588.t +++ b/tests/bugs/nl-cache/bug-1451588.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1034716.t b/tests/bugs/posix/bug-1034716.t index d36f8b598f4..804eb3720e7 100644 --- a/tests/bugs/posix/bug-1034716.t +++ b/tests/bugs/posix/bug-1034716.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t b/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t index 3839c6e3380..e8bd6b26a7c 100755 --- a/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t +++ b/tests/bugs/posix/bug-1040275-brick-uid-reset-on-volume-restart.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1113960.t b/tests/bugs/posix/bug-1113960.t index ee42de2a092..cd879ed5855 100755 --- a/tests/bugs/posix/bug-1113960.t +++ b/tests/bugs/posix/bug-1113960.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1122028.t b/tests/bugs/posix/bug-1122028.t index 492668cf1dc..37060494ce9 100755 --- a/tests/bugs/posix/bug-1122028.t +++ b/tests/bugs/posix/bug-1122028.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1175711.t b/tests/bugs/posix/bug-1175711.t index f4162544d92..d5e58ce8274 100755 --- a/tests/bugs/posix/bug-1175711.t +++ b/tests/bugs/posix/bug-1175711.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1360679.t b/tests/bugs/posix/bug-1360679.t index fbb9d027ddb..277d13f3748 100644 --- a/tests/bugs/posix/bug-1360679.t +++ b/tests/bugs/posix/bug-1360679.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-1619720.t b/tests/bugs/posix/bug-1619720.t index bfd304dc809..a583d70e818 100755 --- a/tests/bugs/posix/bug-1619720.t +++ b/tests/bugs/posix/bug-1619720.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../dht.rc diff --git a/tests/bugs/posix/bug-1651445.t b/tests/bugs/posix/bug-1651445.t index 4d08b69b9b0..0d1c48c57f1 100644 --- a/tests/bugs/posix/bug-1651445.t +++ b/tests/bugs/posix/bug-1651445.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-765380.t b/tests/bugs/posix/bug-765380.t index 34cdd9682e9..19fb01601d6 100644 --- a/tests/bugs/posix/bug-765380.t +++ b/tests/bugs/posix/bug-765380.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/posix/bug-990028.t b/tests/bugs/posix/bug-990028.t index bef36a8897d..8e4a19afaa4 100755 --- a/tests/bugs/posix/bug-990028.t +++ b/tests/bugs/posix/bug-990028.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/bug-gfid-path.t b/tests/bugs/posix/bug-gfid-path.t index 1bbbe9f0670..02d098644ff 100644 --- a/tests/bugs/posix/bug-gfid-path.t +++ b/tests/bugs/posix/bug-gfid-path.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This test case is for the bug where, even though a file is # created when gfid2path option is turned off (default is ON), diff --git a/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t b/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t index b9fd44ae0d7..d954be03661 100755 --- a/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t +++ b/tests/bugs/posix/disallow-gfid-volumeid-fremovexattr.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/posix/disallow-gfid-volumeid-removexattr.t b/tests/bugs/posix/disallow-gfid-volumeid-removexattr.t index d26eb21ccc5..a19df3da3ef 100644 --- a/tests/bugs/posix/disallow-gfid-volumeid-removexattr.t +++ b/tests/bugs/posix/disallow-gfid-volumeid-removexattr.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #This test checks that gfid/volume-id removexattrs are not allowed. . $(dirname $0)/../../include.rc diff --git a/tests/bugs/posix/issue-2752.t b/tests/bugs/posix/issue-2752.t index 613971f9905..8604b06df47 100644 --- a/tests/bugs/posix/issue-2752.t +++ b/tests/bugs/posix/issue-2752.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname ${0})/../../include.rc . $(dirname ${0})/../../volume.rc diff --git a/tests/bugs/posix/posix-reconfigure-uring-crash.t b/tests/bugs/posix/posix-reconfigure-uring-crash.t index dd28fa9e144..a358630e663 100644 --- a/tests/bugs/posix/posix-reconfigure-uring-crash.t +++ b/tests/bugs/posix/posix-reconfigure-uring-crash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-1321578.t b/tests/bugs/protocol/bug-1321578.t index 83904817467..58594c69f09 100644 --- a/tests/bugs/protocol/bug-1321578.t +++ b/tests/bugs/protocol/bug-1321578.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-1390914.t b/tests/bugs/protocol/bug-1390914.t index e3dab92de5a..11a930ace74 100644 --- a/tests/bugs/protocol/bug-1390914.t +++ b/tests/bugs/protocol/bug-1390914.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-1433815-auth-allow.t b/tests/bugs/protocol/bug-1433815-auth-allow.t index a78c0eb7111..60d712d208c 100644 --- a/tests/bugs/protocol/bug-1433815-auth-allow.t +++ b/tests/bugs/protocol/bug-1433815-auth-allow.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-762989.t b/tests/bugs/protocol/bug-762989.t index 7d201b78b58..6565bb5f87b 100755 --- a/tests/bugs/protocol/bug-762989.t +++ b/tests/bugs/protocol/bug-762989.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/protocol/bug-808400-dist.t b/tests/bugs/protocol/bug-808400-dist.t index 0df972585c0..a71b6c4aad6 100755 --- a/tests/bugs/protocol/bug-808400-dist.t +++ b/tests/bugs/protocol/bug-808400-dist.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-808400-repl.t b/tests/bugs/protocol/bug-808400-repl.t index 611e5ec93b7..05db41942d1 100755 --- a/tests/bugs/protocol/bug-808400-repl.t +++ b/tests/bugs/protocol/bug-808400-repl.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/protocol/bug-808400.t b/tests/bugs/protocol/bug-808400.t index 4ae1722fca2..d4cf4a6ccd2 100755 --- a/tests/bugs/protocol/bug-808400.t +++ b/tests/bugs/protocol/bug-808400.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quick-read/bug-846240.t b/tests/bugs/quick-read/bug-846240.t index bb997e10013..dafbd284aaa 100755 --- a/tests/bugs/quick-read/bug-846240.t +++ b/tests/bugs/quick-read/bug-846240.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quick-read/bz1523599/bz1523599.t b/tests/bugs/quick-read/bz1523599/bz1523599.t index 5027efe8e9a..02c2bf44bd5 100755 --- a/tests/bugs/quick-read/bz1523599/bz1523599.t +++ b/tests/bugs/quick-read/bz1523599/bz1523599.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t index ebfa5545728..dd9e678a4e5 100644 --- a/tests/bugs/quota/afr-quota-xattr-mdata-heal.t +++ b/tests/bugs/quota/afr-quota-xattr-mdata-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1035576.t b/tests/bugs/quota/bug-1035576.t index cbc1b69ebb3..acf6093b82a 100644 --- a/tests/bugs/quota/bug-1035576.t +++ b/tests/bugs/quota/bug-1035576.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1038598.t b/tests/bugs/quota/bug-1038598.t index 108e14cb8d8..2a412a8d6e4 100644 --- a/tests/bugs/quota/bug-1038598.t +++ b/tests/bugs/quota/bug-1038598.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1087198.t b/tests/bugs/quota/bug-1087198.t index 618a46b957d..d592a4ad527 100644 --- a/tests/bugs/quota/bug-1087198.t +++ b/tests/bugs/quota/bug-1087198.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## The script tests the logging of the quota in the bricks after reaching soft ## limit of the configured limit. diff --git a/tests/bugs/quota/bug-1104692.t b/tests/bugs/quota/bug-1104692.t index 9640996135f..eda10e28681 100755 --- a/tests/bugs/quota/bug-1104692.t +++ b/tests/bugs/quota/bug-1104692.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1153964.t b/tests/bugs/quota/bug-1153964.t index 2e449d3ba00..b02f42bd175 100644 --- a/tests/bugs/quota/bug-1153964.t +++ b/tests/bugs/quota/bug-1153964.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1178130.t b/tests/bugs/quota/bug-1178130.t index ccd6b792cf8..9396ae7824d 100644 --- a/tests/bugs/quota/bug-1178130.t +++ b/tests/bugs/quota/bug-1178130.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This regression test tries to ensure renaming a directory with content, and # no limit set, is accounted properly, when moved into a directory with quota diff --git a/tests/bugs/quota/bug-1235182.t b/tests/bugs/quota/bug-1235182.t index 6091146cb97..24d83615f26 100644 --- a/tests/bugs/quota/bug-1235182.t +++ b/tests/bugs/quota/bug-1235182.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This regression test tries to ensure renaming a directory with content, and # no limit set, is accounted properly, when moved into a directory with quota diff --git a/tests/bugs/quota/bug-1243798.t b/tests/bugs/quota/bug-1243798.t index fa6abeb08fb..47f1d79a0a6 100644 --- a/tests/bugs/quota/bug-1243798.t +++ b/tests/bugs/quota/bug-1243798.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1250582-volume-reset-should-not-remove-quota-quota-deem-statfs.t b/tests/bugs/quota/bug-1250582-volume-reset-should-not-remove-quota-quota-deem-statfs.t index 3b55e739bf9..916a8395f80 100644 --- a/tests/bugs/quota/bug-1250582-volume-reset-should-not-remove-quota-quota-deem-statfs.t +++ b/tests/bugs/quota/bug-1250582-volume-reset-should-not-remove-quota-quota-deem-statfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This test ensures that 'gluster volume reset' command do not remove # features.quota-deem-statfs, features.quota. diff --git a/tests/bugs/quota/bug-1260545.t b/tests/bugs/quota/bug-1260545.t index 46808022f01..ddac7070239 100644 --- a/tests/bugs/quota/bug-1260545.t +++ b/tests/bugs/quota/bug-1260545.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1287996.t b/tests/bugs/quota/bug-1287996.t index 2f46ee1ca2d..ade2b3dd870 100644 --- a/tests/bugs/quota/bug-1287996.t +++ b/tests/bugs/quota/bug-1287996.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/quota/bug-1292020.t b/tests/bugs/quota/bug-1292020.t index b70047ae3f9..89c24ea1d1f 100644 --- a/tests/bugs/quota/bug-1292020.t +++ b/tests/bugs/quota/bug-1292020.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/quota/bug-1293601.t b/tests/bugs/quota/bug-1293601.t index 741758b73f5..439572e4a7d 100644 --- a/tests/bugs/quota/bug-1293601.t +++ b/tests/bugs/quota/bug-1293601.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/read-only/bug-1134822-read-only-default-in-graph.t b/tests/bugs/read-only/bug-1134822-read-only-default-in-graph.t index cc27d04656f..cc4d2086113 100644 --- a/tests/bugs/read-only/bug-1134822-read-only-default-in-graph.t +++ b/tests/bugs/read-only/bug-1134822-read-only-default-in-graph.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test case: This test checks when a volume is made read-only though volume set # and bricks are not restarted no write operations can be performed on diff --git a/tests/bugs/readdir-ahead/bug-1390050.t b/tests/bugs/readdir-ahead/bug-1390050.t index ab1d7d4ead9..4551b2e5989 100644 --- a/tests/bugs/readdir-ahead/bug-1390050.t +++ b/tests/bugs/readdir-ahead/bug-1390050.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/readdir-ahead/bug-1436090.t b/tests/bugs/readdir-ahead/bug-1436090.t index 29d193c8b06..bfc5a273ba6 100755 --- a/tests/bugs/readdir-ahead/bug-1436090.t +++ b/tests/bugs/readdir-ahead/bug-1436090.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/readdir-ahead/bug-1439640.t b/tests/bugs/readdir-ahead/bug-1439640.t index dcd54076444..c1d4405d39f 100755 --- a/tests/bugs/readdir-ahead/bug-1439640.t +++ b/tests/bugs/readdir-ahead/bug-1439640.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/readdir-ahead/bug-1446516.t b/tests/bugs/readdir-ahead/bug-1446516.t index 2bf6520d861..6201773d055 100755 --- a/tests/bugs/readdir-ahead/bug-1446516.t +++ b/tests/bugs/readdir-ahead/bug-1446516.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/readdir-ahead/bug-1512437.t b/tests/bugs/readdir-ahead/bug-1512437.t index 50eaa7d6696..3c91923edf7 100755 --- a/tests/bugs/readdir-ahead/bug-1512437.t +++ b/tests/bugs/readdir-ahead/bug-1512437.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/readdir-ahead/bug-1670253-consistent-metadata.t b/tests/bugs/readdir-ahead/bug-1670253-consistent-metadata.t index 6adfc17c92c..55ae3eaff75 100644 --- a/tests/bugs/readdir-ahead/bug-1670253-consistent-metadata.t +++ b/tests/bugs/readdir-ahead/bug-1670253-consistent-metadata.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/886998/strict-readdir.t b/tests/bugs/replicate/886998/strict-readdir.t index 63fe313b201..ada1ff25575 100644 --- a/tests/bugs/replicate/886998/strict-readdir.t +++ b/tests/bugs/replicate/886998/strict-readdir.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../../include.rc . $(dirname $0)/../../../volume.rc diff --git a/tests/bugs/replicate/bug-1015990-rep.t b/tests/bugs/replicate/bug-1015990-rep.t index ab8166e372a..e25c47c50c4 100755 --- a/tests/bugs/replicate/bug-1015990-rep.t +++ b/tests/bugs/replicate/bug-1015990-rep.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1015990.t b/tests/bugs/replicate/bug-1015990.t index a8b12f2c202..3706e94ebbd 100755 --- a/tests/bugs/replicate/bug-1015990.t +++ b/tests/bugs/replicate/bug-1015990.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1032927.t b/tests/bugs/replicate/bug-1032927.t index eb663d03fed..5799705027b 100644 --- a/tests/bugs/replicate/bug-1032927.t +++ b/tests/bugs/replicate/bug-1032927.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1037501.t b/tests/bugs/replicate/bug-1037501.t index ce079555b50..8f58c1a94f3 100755 --- a/tests/bugs/replicate/bug-1037501.t +++ b/tests/bugs/replicate/bug-1037501.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1046624.t b/tests/bugs/replicate/bug-1046624.t index e2762ea6764..e3c4bbd49c6 100755 --- a/tests/bugs/replicate/bug-1046624.t +++ b/tests/bugs/replicate/bug-1046624.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1058797.t b/tests/bugs/replicate/bug-1058797.t index 598062a0dab..d7e1d48e4d2 100644 --- a/tests/bugs/replicate/bug-1058797.t +++ b/tests/bugs/replicate/bug-1058797.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test that the setuid bit is healed correctly. . $(dirname $0)/../../include.rc diff --git a/tests/bugs/replicate/bug-1101647.t b/tests/bugs/replicate/bug-1101647.t index 998794e086a..da8cd952793 100644 --- a/tests/bugs/replicate/bug-1101647.t +++ b/tests/bugs/replicate/bug-1101647.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1130892.t b/tests/bugs/replicate/bug-1130892.t index 4ccd596c829..8a62f9d1d69 100644 --- a/tests/bugs/replicate/bug-1130892.t +++ b/tests/bugs/replicate/bug-1130892.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1132102.t b/tests/bugs/replicate/bug-1132102.t index c7dbbf818aa..9a3330c843f 100644 --- a/tests/bugs/replicate/bug-1132102.t +++ b/tests/bugs/replicate/bug-1132102.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #This tests that mknod and create fops mark necessary pending changelog . $(dirname $0)/../../include.rc diff --git a/tests/bugs/replicate/bug-1134691-afr-lookup-metadata-heal.t b/tests/bugs/replicate/bug-1134691-afr-lookup-metadata-heal.t index b69a38ae788..fdfe7113203 100644 --- a/tests/bugs/replicate/bug-1134691-afr-lookup-metadata-heal.t +++ b/tests/bugs/replicate/bug-1134691-afr-lookup-metadata-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #### Test iatt and user xattr heal from lookup code path #### . $(dirname $0)/../../include.rc diff --git a/tests/bugs/replicate/bug-1139230.t b/tests/bugs/replicate/bug-1139230.t index 9ceac6c4f4e..ee2047e2ee3 100644 --- a/tests/bugs/replicate/bug-1139230.t +++ b/tests/bugs/replicate/bug-1139230.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1180545.t b/tests/bugs/replicate/bug-1180545.t index 5e40edd6c38..c11898f8506 100644 --- a/tests/bugs/replicate/bug-1180545.t +++ b/tests/bugs/replicate/bug-1180545.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Create gfid split-brain of directory and check if conservative merge #completes successfully. diff --git a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t index fe8e992e8f8..346e66b2255 100644 --- a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t +++ b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t b/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t index 6ff471fbf15..d9ca3f9d0f9 100644 --- a/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t +++ b/tests/bugs/replicate/bug-1221481-allow-fops-on-dir-split-brain.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1238398-split-brain-resolution.t b/tests/bugs/replicate/bug-1238398-split-brain-resolution.t index 8ef3aae979f..7a8e50bb935 100644 --- a/tests/bugs/replicate/bug-1238398-split-brain-resolution.t +++ b/tests/bugs/replicate/bug-1238398-split-brain-resolution.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1238508-self-heal.t b/tests/bugs/replicate/bug-1238508-self-heal.t index 24fb07d31f0..910911ef99a 100644 --- a/tests/bugs/replicate/bug-1238508-self-heal.t +++ b/tests/bugs/replicate/bug-1238508-self-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1250170-fsync.t b/tests/bugs/replicate/bug-1250170-fsync.t index 7a3fdbf8bb5..a547cadf1fb 100644 --- a/tests/bugs/replicate/bug-1250170-fsync.t +++ b/tests/bugs/replicate/bug-1250170-fsync.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1266876-allow-reset-brick-for-same-path.t b/tests/bugs/replicate/bug-1266876-allow-reset-brick-for-same-path.t index 884b7892954..f0ce53c8aae 100644 --- a/tests/bugs/replicate/bug-1266876-allow-reset-brick-for-same-path.t +++ b/tests/bugs/replicate/bug-1266876-allow-reset-brick-for-same-path.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1292379.t b/tests/bugs/replicate/bug-1292379.t index be1bf699173..722c24b200c 100644 --- a/tests/bugs/replicate/bug-1292379.t +++ b/tests/bugs/replicate/bug-1292379.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1297695.t b/tests/bugs/replicate/bug-1297695.t index 23884117b59..9170c3a6a06 100644 --- a/tests/bugs/replicate/bug-1297695.t +++ b/tests/bugs/replicate/bug-1297695.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1305031-block-reads-on-metadata-sbrain.t b/tests/bugs/replicate/bug-1305031-block-reads-on-metadata-sbrain.t index 780ddb9250c..f38e97fd231 100644 --- a/tests/bugs/replicate/bug-1305031-block-reads-on-metadata-sbrain.t +++ b/tests/bugs/replicate/bug-1305031-block-reads-on-metadata-sbrain.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1325792.t b/tests/bugs/replicate/bug-1325792.t index d4af5e64d30..15b4ac0e34a 100644 --- a/tests/bugs/replicate/bug-1325792.t +++ b/tests/bugs/replicate/bug-1325792.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1335652.t b/tests/bugs/replicate/bug-1335652.t index 653a1b05ce2..8ac8dfc568d 100644 --- a/tests/bugs/replicate/bug-1335652.t +++ b/tests/bugs/replicate/bug-1335652.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1340623-mkdir-fails-remove-brick-started.t b/tests/bugs/replicate/bug-1340623-mkdir-fails-remove-brick-started.t index 6d177a7d3f8..55733d1e506 100644 --- a/tests/bugs/replicate/bug-1340623-mkdir-fails-remove-brick-started.t +++ b/tests/bugs/replicate/bug-1340623-mkdir-fails-remove-brick-started.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1341650.t b/tests/bugs/replicate/bug-1341650.t index 610342ca5bd..700438a6728 100644 --- a/tests/bugs/replicate/bug-1341650.t +++ b/tests/bugs/replicate/bug-1341650.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1363721.t b/tests/bugs/replicate/bug-1363721.t index 0ed34d8a4f4..7cb9784a8f5 100644 --- a/tests/bugs/replicate/bug-1363721.t +++ b/tests/bugs/replicate/bug-1363721.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1365455.t b/tests/bugs/replicate/bug-1365455.t index 1953e2a9327..836819e4570 100644 --- a/tests/bugs/replicate/bug-1365455.t +++ b/tests/bugs/replicate/bug-1365455.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1386188-sbrain-fav-child.t b/tests/bugs/replicate/bug-1386188-sbrain-fav-child.t index d049d95ef9a..77350046742 100644 --- a/tests/bugs/replicate/bug-1386188-sbrain-fav-child.t +++ b/tests/bugs/replicate/bug-1386188-sbrain-fav-child.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1402730.t b/tests/bugs/replicate/bug-1402730.t index c7866df463b..f5be9a23620 100644 --- a/tests/bugs/replicate/bug-1402730.t +++ b/tests/bugs/replicate/bug-1402730.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1408712.t b/tests/bugs/replicate/bug-1408712.t index 9499a598ef1..3a0676511c0 100644 --- a/tests/bugs/replicate/bug-1408712.t +++ b/tests/bugs/replicate/bug-1408712.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1417522-block-split-brain-resolution.t b/tests/bugs/replicate/bug-1417522-block-split-brain-resolution.t index d0e2fee8bcd..44dbe45f6a4 100644 --- a/tests/bugs/replicate/bug-1417522-block-split-brain-resolution.t +++ b/tests/bugs/replicate/bug-1417522-block-split-brain-resolution.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1433571-undo-pending-only-on-up-bricks.t b/tests/bugs/replicate/bug-1433571-undo-pending-only-on-up-bricks.t index 10ce0131f4f..be2322cc1e9 100644 --- a/tests/bugs/replicate/bug-1433571-undo-pending-only-on-up-bricks.t +++ b/tests/bugs/replicate/bug-1433571-undo-pending-only-on-up-bricks.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1438255-do-not-mark-self-accusing-xattrs.t b/tests/bugs/replicate/bug-1438255-do-not-mark-self-accusing-xattrs.t index cdcaf62c925..8fd567950ff 100644 --- a/tests/bugs/replicate/bug-1438255-do-not-mark-self-accusing-xattrs.t +++ b/tests/bugs/replicate/bug-1438255-do-not-mark-self-accusing-xattrs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1448804-check-quorum-type-values.t b/tests/bugs/replicate/bug-1448804-check-quorum-type-values.t index 5bacf3edcfe..6463c64cef7 100644 --- a/tests/bugs/replicate/bug-1448804-check-quorum-type-values.t +++ b/tests/bugs/replicate/bug-1448804-check-quorum-type-values.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1473026.t b/tests/bugs/replicate/bug-1473026.t index efb3ffa0d39..0e924d4c756 100644 --- a/tests/bugs/replicate/bug-1473026.t +++ b/tests/bugs/replicate/bug-1473026.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1477169-entry-selfheal-rename.t b/tests/bugs/replicate/bug-1477169-entry-selfheal-rename.t index bb858a8a63d..f3a8453af33 100644 --- a/tests/bugs/replicate/bug-1477169-entry-selfheal-rename.t +++ b/tests/bugs/replicate/bug-1477169-entry-selfheal-rename.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1480525.t b/tests/bugs/replicate/bug-1480525.t index 7c63bb2e4ea..61fe9ae557c 100644 --- a/tests/bugs/replicate/bug-1480525.t +++ b/tests/bugs/replicate/bug-1480525.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1493415-gfid-heal.t b/tests/bugs/replicate/bug-1493415-gfid-heal.t index 20ce4ee1dd2..7d28df94a35 100644 --- a/tests/bugs/replicate/bug-1493415-gfid-heal.t +++ b/tests/bugs/replicate/bug-1493415-gfid-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t b/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t index 2b3b3040228..b3783ac4011 100644 --- a/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t +++ b/tests/bugs/replicate/bug-1498570-client-iot-graph-check.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-1539358-split-brain-detection.t b/tests/bugs/replicate/bug-1539358-split-brain-detection.t index 7b71a7a9e7d..e49f1d9ebbf 100755 --- a/tests/bugs/replicate/bug-1539358-split-brain-detection.t +++ b/tests/bugs/replicate/bug-1539358-split-brain-detection.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1561129-enospc.t b/tests/bugs/replicate/bug-1561129-enospc.t index 1b402fcc781..967431a19fc 100644 --- a/tests/bugs/replicate/bug-1561129-enospc.t +++ b/tests/bugs/replicate/bug-1561129-enospc.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Tests that sequential write workload doesn't lead to FSYNCs . $(dirname $0)/../../include.rc diff --git a/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t b/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t index 49c4dea4e9c..cc80d350881 100644 --- a/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t +++ b/tests/bugs/replicate/bug-1586020-mark-dirty-for-entry-txn-on-quorum-failure.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t b/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t index c6e5459e9a8..8e12fed9297 100644 --- a/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t +++ b/tests/bugs/replicate/bug-1591193-assign-gfid-and-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1626994-info-split-brain.t b/tests/bugs/replicate/bug-1626994-info-split-brain.t index 79a29e6f473..3ec495e76a8 100644 --- a/tests/bugs/replicate/bug-1626994-info-split-brain.t +++ b/tests/bugs/replicate/bug-1626994-info-split-brain.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1637249-gfid-heal.t b/tests/bugs/replicate/bug-1637249-gfid-heal.t index e824f14531e..3eba9a32b68 100644 --- a/tests/bugs/replicate/bug-1637249-gfid-heal.t +++ b/tests/bugs/replicate/bug-1637249-gfid-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t b/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t index d7d1f285e01..a67dc9a02fb 100644 --- a/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t +++ b/tests/bugs/replicate/bug-1637802-arbiter-stale-data-heal-lock.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1655050-dir-sbrain-size-policy.t b/tests/bugs/replicate/bug-1655050-dir-sbrain-size-policy.t index 63f72e86bf6..74ce4ef5484 100644 --- a/tests/bugs/replicate/bug-1655050-dir-sbrain-size-policy.t +++ b/tests/bugs/replicate/bug-1655050-dir-sbrain-size-policy.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1655052-sbrain-policy-same-size.t b/tests/bugs/replicate/bug-1655052-sbrain-policy-same-size.t index 319736e1157..a037ad681ca 100755 --- a/tests/bugs/replicate/bug-1655052-sbrain-policy-same-size.t +++ b/tests/bugs/replicate/bug-1655052-sbrain-policy-same-size.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test the split-brain resolution CLI commands. . $(dirname $0)/../../include.rc diff --git a/tests/bugs/replicate/bug-1655854-support-dist-to-rep3-arb-conversion.t b/tests/bugs/replicate/bug-1655854-support-dist-to-rep3-arb-conversion.t index 783016dc3c0..b7154fe0d28 100644 --- a/tests/bugs/replicate/bug-1655854-support-dist-to-rep3-arb-conversion.t +++ b/tests/bugs/replicate/bug-1655854-support-dist-to-rep3-arb-conversion.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1657783-do-not-update-read-subvol-on-rename-link.t b/tests/bugs/replicate/bug-1657783-do-not-update-read-subvol-on-rename-link.t index b180f0e1239..5a61d55cec3 100644 --- a/tests/bugs/replicate/bug-1657783-do-not-update-read-subvol-on-rename-link.t +++ b/tests/bugs/replicate/bug-1657783-do-not-update-read-subvol-on-rename-link.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1686568-send-truncate-on-arbiter-from-shd.t b/tests/bugs/replicate/bug-1686568-send-truncate-on-arbiter-from-shd.t index 78581e99614..0e698f82604 100644 --- a/tests/bugs/replicate/bug-1686568-send-truncate-on-arbiter-from-shd.t +++ b/tests/bugs/replicate/bug-1686568-send-truncate-on-arbiter-from-shd.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc cleanup; diff --git a/tests/bugs/replicate/bug-1696599-io-hang.t b/tests/bugs/replicate/bug-1696599-io-hang.t index 869cdb94bda..7dc3725315a 100755 --- a/tests/bugs/replicate/bug-1696599-io-hang.t +++ b/tests/bugs/replicate/bug-1696599-io-hang.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t b/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t index 76d1f2170f2..9c9f721f529 100644 --- a/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t +++ b/tests/bugs/replicate/bug-1717819-metadata-split-brain-detection.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1722507-type-mismatch-error-handling.t b/tests/bugs/replicate/bug-1722507-type-mismatch-error-handling.t index 0bd2b48cde6..55806d74750 100644 --- a/tests/bugs/replicate/bug-1722507-type-mismatch-error-handling.t +++ b/tests/bugs/replicate/bug-1722507-type-mismatch-error-handling.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1728770-pass-xattrs.t b/tests/bugs/replicate/bug-1728770-pass-xattrs.t index bfbef93070a..7f5a6000e9d 100644 --- a/tests/bugs/replicate/bug-1728770-pass-xattrs.t +++ b/tests/bugs/replicate/bug-1728770-pass-xattrs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1734370-entry-heal-restore-time.t b/tests/bugs/replicate/bug-1734370-entry-heal-restore-time.t index 14dfae89135..03c5bf9a727 100644 --- a/tests/bugs/replicate/bug-1734370-entry-heal-restore-time.t +++ b/tests/bugs/replicate/bug-1734370-entry-heal-restore-time.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1744548-heal-timeout.t b/tests/bugs/replicate/bug-1744548-heal-timeout.t index 011535066f9..30e44e57438 100644 --- a/tests/bugs/replicate/bug-1744548-heal-timeout.t +++ b/tests/bugs/replicate/bug-1744548-heal-timeout.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1749322-entry-heal-not-happening.t b/tests/bugs/replicate/bug-1749322-entry-heal-not-happening.t index 48e46e117ec..2b1e67cfcc8 100644 --- a/tests/bugs/replicate/bug-1749322-entry-heal-not-happening.t +++ b/tests/bugs/replicate/bug-1749322-entry-heal-not-happening.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1756938-replica-3-sbrain-cli.t b/tests/bugs/replicate/bug-1756938-replica-3-sbrain-cli.t index 036be67ba51..ac8322d9f82 100644 --- a/tests/bugs/replicate/bug-1756938-replica-3-sbrain-cli.t +++ b/tests/bugs/replicate/bug-1756938-replica-3-sbrain-cli.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1761531-metadata-heal-restore-time.t b/tests/bugs/replicate/bug-1761531-metadata-heal-restore-time.t index 7e24eaec03d..0dfdbd8016e 100644 --- a/tests/bugs/replicate/bug-1761531-metadata-heal-restore-time.t +++ b/tests/bugs/replicate/bug-1761531-metadata-heal-restore-time.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-1801624-entry-heal.t b/tests/bugs/replicate/bug-1801624-entry-heal.t index 611da6e6500..f5512dff6cf 100644 --- a/tests/bugs/replicate/bug-1801624-entry-heal.t +++ b/tests/bugs/replicate/bug-1801624-entry-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-765564.t b/tests/bugs/replicate/bug-765564.t index 098d225018f..d1ca0a7c80d 100644 --- a/tests/bugs/replicate/bug-765564.t +++ b/tests/bugs/replicate/bug-765564.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-767585-gfid.t b/tests/bugs/replicate/bug-767585-gfid.t index 4176aabb544..cc999ac221f 100755 --- a/tests/bugs/replicate/bug-767585-gfid.t +++ b/tests/bugs/replicate/bug-767585-gfid.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-802417.t b/tests/bugs/replicate/bug-802417.t index f213439401e..38ba3b4c630 100755 --- a/tests/bugs/replicate/bug-802417.t +++ b/tests/bugs/replicate/bug-802417.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-821056.t b/tests/bugs/replicate/bug-821056.t index 81186d86309..d75a1006b6d 100644 --- a/tests/bugs/replicate/bug-821056.t +++ b/tests/bugs/replicate/bug-821056.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-830665.t b/tests/bugs/replicate/bug-830665.t index 68180424803..b34294d6266 100755 --- a/tests/bugs/replicate/bug-830665.t +++ b/tests/bugs/replicate/bug-830665.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/replicate/bug-859581.t b/tests/bugs/replicate/bug-859581.t index d8b45a257a1..7d39577cbbf 100755 --- a/tests/bugs/replicate/bug-859581.t +++ b/tests/bugs/replicate/bug-859581.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-865825.t b/tests/bugs/replicate/bug-865825.t index ffb2e0f6437..2ef4f40b065 100755 --- a/tests/bugs/replicate/bug-865825.t +++ b/tests/bugs/replicate/bug-865825.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-880898.t b/tests/bugs/replicate/bug-880898.t index 660d34ca25f..bab1133bf37 100644 --- a/tests/bugs/replicate/bug-880898.t +++ b/tests/bugs/replicate/bug-880898.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-884328.t b/tests/bugs/replicate/bug-884328.t index acc8e542240..73ec5b5a3fc 100644 --- a/tests/bugs/replicate/bug-884328.t +++ b/tests/bugs/replicate/bug-884328.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-886998.t b/tests/bugs/replicate/bug-886998.t index bcac235ff09..9568ba8f442 100644 --- a/tests/bugs/replicate/bug-886998.t +++ b/tests/bugs/replicate/bug-886998.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-888174.t b/tests/bugs/replicate/bug-888174.t index b2804c10a5e..702c5ed1140 100644 --- a/tests/bugs/replicate/bug-888174.t +++ b/tests/bugs/replicate/bug-888174.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-913051.t b/tests/bugs/replicate/bug-913051.t index 6794995e6fe..6edbd5493fc 100644 --- a/tests/bugs/replicate/bug-913051.t +++ b/tests/bugs/replicate/bug-913051.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-916226.t b/tests/bugs/replicate/bug-916226.t index 893905f9a47..68e8b55566c 100644 --- a/tests/bugs/replicate/bug-916226.t +++ b/tests/bugs/replicate/bug-916226.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-918437-sh-mtime.t b/tests/bugs/replicate/bug-918437-sh-mtime.t index 6a194b14a9b..f6020e559e4 100644 --- a/tests/bugs/replicate/bug-918437-sh-mtime.t +++ b/tests/bugs/replicate/bug-918437-sh-mtime.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-921231.t b/tests/bugs/replicate/bug-921231.t index 7dcd565ede3..1b2e760fd3b 100755 --- a/tests/bugs/replicate/bug-921231.t +++ b/tests/bugs/replicate/bug-921231.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-957877.t b/tests/bugs/replicate/bug-957877.t index bcce7e3c9e7..a5f564c7524 100644 --- a/tests/bugs/replicate/bug-957877.t +++ b/tests/bugs/replicate/bug-957877.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/replicate/bug-976800.t b/tests/bugs/replicate/bug-976800.t index 9612c0a4436..679bcc2332a 100644 --- a/tests/bugs/replicate/bug-976800.t +++ b/tests/bugs/replicate/bug-976800.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-977797.t b/tests/bugs/replicate/bug-977797.t index 9a8f36c956c..74863051f9c 100755 --- a/tests/bugs/replicate/bug-977797.t +++ b/tests/bugs/replicate/bug-977797.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-978794.t b/tests/bugs/replicate/bug-978794.t index 8e43e74bf79..8223d23b4af 100644 --- a/tests/bugs/replicate/bug-978794.t +++ b/tests/bugs/replicate/bug-978794.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../fileio.rc diff --git a/tests/bugs/replicate/bug-979365.t b/tests/bugs/replicate/bug-979365.t index 9392cef2055..7773baa5b63 100755 --- a/tests/bugs/replicate/bug-979365.t +++ b/tests/bugs/replicate/bug-979365.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/bug-986905.t b/tests/bugs/replicate/bug-986905.t index f4f7386ebc4..2373feb0ec1 100755 --- a/tests/bugs/replicate/bug-986905.t +++ b/tests/bugs/replicate/bug-986905.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/do-not-reopen-fd.t b/tests/bugs/replicate/do-not-reopen-fd.t index f34670941f3..e2d865dfbb3 100644 --- a/tests/bugs/replicate/do-not-reopen-fd.t +++ b/tests/bugs/replicate/do-not-reopen-fd.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/issue-1254-prioritize-enospc.t b/tests/bugs/replicate/issue-1254-prioritize-enospc.t index 1c09da6a830..3feb1d3ee93 100644 --- a/tests/bugs/replicate/issue-1254-prioritize-enospc.t +++ b/tests/bugs/replicate/issue-1254-prioritize-enospc.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/issue-2232.t b/tests/bugs/replicate/issue-2232.t index 66a41e000cf..6d6f312bcbf 100644 --- a/tests/bugs/replicate/issue-2232.t +++ b/tests/bugs/replicate/issue-2232.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname "${0}")/../../include.rc . $(dirname "${0}")/../../volume.rc diff --git a/tests/bugs/replicate/issue-3238-mdata-unnecessary-heal.t b/tests/bugs/replicate/issue-3238-mdata-unnecessary-heal.t index 3f93aa2d6f4..0b9768494f8 100755 --- a/tests/bugs/replicate/issue-3238-mdata-unnecessary-heal.t +++ b/tests/bugs/replicate/issue-3238-mdata-unnecessary-heal.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/issue-3288-dir-gfid-mismatch-heal-option.t b/tests/bugs/replicate/issue-3288-dir-gfid-mismatch-heal-option.t index 3880b9c5099..1f49338244f 100644 --- a/tests/bugs/replicate/issue-3288-dir-gfid-mismatch-heal-option.t +++ b/tests/bugs/replicate/issue-3288-dir-gfid-mismatch-heal-option.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/mdata-heal-no-xattrs.t b/tests/bugs/replicate/mdata-heal-no-xattrs.t index 8d7da8c187e..e19cd32da03 100644 --- a/tests/bugs/replicate/mdata-heal-no-xattrs.t +++ b/tests/bugs/replicate/mdata-heal-no-xattrs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/replicate/ta-inode-refresh-read.t b/tests/bugs/replicate/ta-inode-refresh-read.t index 6dd6ff7f163..2ef2e024d92 100644 --- a/tests/bugs/replicate/ta-inode-refresh-read.t +++ b/tests/bugs/replicate/ta-inode-refresh-read.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test read transaction inode refresh logic for thin-arbiter. diff --git a/tests/bugs/rpc/bug-1043886.t b/tests/bugs/rpc/bug-1043886.t index c1ea7a71e8b..ba40397cfbc 100755 --- a/tests/bugs/rpc/bug-1043886.t +++ b/tests/bugs/rpc/bug-1043886.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/rpc/bug-847624.t b/tests/bugs/rpc/bug-847624.t index fe8fc982887..ecacd410e1e 100755 --- a/tests/bugs/rpc/bug-847624.t +++ b/tests/bugs/rpc/bug-847624.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/rpc/bug-884452.t b/tests/bugs/rpc/bug-884452.t index c161a68190d..467fcc79a9b 100644 --- a/tests/bugs/rpc/bug-884452.t +++ b/tests/bugs/rpc/bug-884452.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/rpc/bug-921072.t b/tests/bugs/rpc/bug-921072.t index b38108629c0..f160ca14bba 100755 --- a/tests/bugs/rpc/bug-921072.t +++ b/tests/bugs/rpc/bug-921072.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/rpc/bug-954057.t b/tests/bugs/rpc/bug-954057.t index 40acdc2fdc7..3f17666ed82 100755 --- a/tests/bugs/rpc/bug-954057.t +++ b/tests/bugs/rpc/bug-954057.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1245547.t b/tests/bugs/shard/bug-1245547.t index 3c46785d10f..1a48a569c63 100644 --- a/tests/bugs/shard/bug-1245547.t +++ b/tests/bugs/shard/bug-1245547.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1248887.t b/tests/bugs/shard/bug-1248887.t index 2c51f7ce0e8..ef1bce83c4f 100644 --- a/tests/bugs/shard/bug-1248887.t +++ b/tests/bugs/shard/bug-1248887.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1250855.t b/tests/bugs/shard/bug-1250855.t index b8bc3b42513..eed3a235217 100644 --- a/tests/bugs/shard/bug-1250855.t +++ b/tests/bugs/shard/bug-1250855.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1251824.t b/tests/bugs/shard/bug-1251824.t index d81685d01de..478dabeccb1 100644 --- a/tests/bugs/shard/bug-1251824.t +++ b/tests/bugs/shard/bug-1251824.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1256580.t b/tests/bugs/shard/bug-1256580.t index 279fcc54e48..5d892c7e151 100644 --- a/tests/bugs/shard/bug-1256580.t +++ b/tests/bugs/shard/bug-1256580.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1258334.t b/tests/bugs/shard/bug-1258334.t index 94ed822aae8..235d3cc158e 100644 --- a/tests/bugs/shard/bug-1258334.t +++ b/tests/bugs/shard/bug-1258334.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1259651.t b/tests/bugs/shard/bug-1259651.t index 72856fdbaad..14cd21c5a7f 100644 --- a/tests/bugs/shard/bug-1259651.t +++ b/tests/bugs/shard/bug-1259651.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1260637.t b/tests/bugs/shard/bug-1260637.t index 21008ee19dd..4580c2f8c37 100644 --- a/tests/bugs/shard/bug-1260637.t +++ b/tests/bugs/shard/bug-1260637.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1261773.t b/tests/bugs/shard/bug-1261773.t index 46d5a8b91c9..703e8f3b512 100644 --- a/tests/bugs/shard/bug-1261773.t +++ b/tests/bugs/shard/bug-1261773.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1272986.t b/tests/bugs/shard/bug-1272986.t index 66e896ad0c4..8879d69a5cd 100644 --- a/tests/bugs/shard/bug-1272986.t +++ b/tests/bugs/shard/bug-1272986.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1342298.t b/tests/bugs/shard/bug-1342298.t index ecd7720e8db..78ff8ab5990 100644 --- a/tests/bugs/shard/bug-1342298.t +++ b/tests/bugs/shard/bug-1342298.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1468483.t b/tests/bugs/shard/bug-1468483.t index e462b8d54d5..2b39e43cac7 100644 --- a/tests/bugs/shard/bug-1468483.t +++ b/tests/bugs/shard/bug-1468483.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1488546.t b/tests/bugs/shard/bug-1488546.t index 60480dc55e5..7fefde99f81 100644 --- a/tests/bugs/shard/bug-1488546.t +++ b/tests/bugs/shard/bug-1488546.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1568521-EEXIST.t b/tests/bugs/shard/bug-1568521-EEXIST.t index 2f9f165aa63..9d791f04014 100644 --- a/tests/bugs/shard/bug-1568521-EEXIST.t +++ b/tests/bugs/shard/bug-1568521-EEXIST.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1568521.t b/tests/bugs/shard/bug-1568521.t index 167fb635ac8..34da4c508ba 100644 --- a/tests/bugs/shard/bug-1568521.t +++ b/tests/bugs/shard/bug-1568521.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/bug-1605056-2.t b/tests/bugs/shard/bug-1605056-2.t index a9c10fec3ea..48e29c7e44b 100644 --- a/tests/bugs/shard/bug-1605056-2.t +++ b/tests/bugs/shard/bug-1605056-2.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1605056.t b/tests/bugs/shard/bug-1605056.t index c2329ea79f8..1e37ef7835c 100644 --- a/tests/bugs/shard/bug-1605056.t +++ b/tests/bugs/shard/bug-1605056.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1669077.t b/tests/bugs/shard/bug-1669077.t index 8d3a67a36be..3ca30037dcc 100644 --- a/tests/bugs/shard/bug-1669077.t +++ b/tests/bugs/shard/bug-1669077.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1696136-lru-limit-equals-deletion-rate.t b/tests/bugs/shard/bug-1696136-lru-limit-equals-deletion-rate.t index 3e4a65af19a..e821899812b 100644 --- a/tests/bugs/shard/bug-1696136-lru-limit-equals-deletion-rate.t +++ b/tests/bugs/shard/bug-1696136-lru-limit-equals-deletion-rate.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1696136.t b/tests/bugs/shard/bug-1696136.t index b6dc858f083..3e97a5193bc 100644 --- a/tests/bugs/shard/bug-1696136.t +++ b/tests/bugs/shard/bug-1696136.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1705884.t b/tests/bugs/shard/bug-1705884.t index f6e50376a58..632987ceecd 100644 --- a/tests/bugs/shard/bug-1705884.t +++ b/tests/bugs/shard/bug-1705884.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-1738419.t b/tests/bugs/shard/bug-1738419.t index 8d0a31d9754..b31b8d2c0cc 100644 --- a/tests/bugs/shard/bug-1738419.t +++ b/tests/bugs/shard/bug-1738419.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-shard-discard.t b/tests/bugs/shard/bug-shard-discard.t index 910ade14801..abd8b7280b2 100644 --- a/tests/bugs/shard/bug-shard-discard.t +++ b/tests/bugs/shard/bug-shard-discard.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/bug-shard-zerofill.t b/tests/bugs/shard/bug-shard-zerofill.t index 4a919a24b99..24405b89789 100644 --- a/tests/bugs/shard/bug-shard-zerofill.t +++ b/tests/bugs/shard/bug-shard-zerofill.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/configure-lru-limit.t b/tests/bugs/shard/configure-lru-limit.t index 923a4d8d747..e76a1933897 100644 --- a/tests/bugs/shard/configure-lru-limit.t +++ b/tests/bugs/shard/configure-lru-limit.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/issue-1243.t b/tests/bugs/shard/issue-1243.t index ba22d2b74fe..825a3a347ee 100644 --- a/tests/bugs/shard/issue-1243.t +++ b/tests/bugs/shard/issue-1243.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/issue-1281.t b/tests/bugs/shard/issue-1281.t index 9704caa8944..c1b4a8e3a2b 100644 --- a/tests/bugs/shard/issue-1281.t +++ b/tests/bugs/shard/issue-1281.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc diff --git a/tests/bugs/shard/issue-1358.t b/tests/bugs/shard/issue-1358.t index 1838e06b3ab..95708d72b07 100644 --- a/tests/bugs/shard/issue-1358.t +++ b/tests/bugs/shard/issue-1358.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/issue-1384.t b/tests/bugs/shard/issue-1384.t index 74e24e6d46b..87708991c1f 100644 --- a/tests/bugs/shard/issue-1384.t +++ b/tests/bugs/shard/issue-1384.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/issue-1425.t b/tests/bugs/shard/issue-1425.t index 8b777054e6f..26eb1874f6b 100644 --- a/tests/bugs/shard/issue-1425.t +++ b/tests/bugs/shard/issue-1425.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/issue-2038.t b/tests/bugs/shard/issue-2038.t index fc3e7f99ea3..484c55899b8 100644 --- a/tests/bugs/shard/issue-2038.t +++ b/tests/bugs/shard/issue-2038.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/parallel-truncate-read.t b/tests/bugs/shard/parallel-truncate-read.t index 4ca8ec03192..974eec6edd7 100644 --- a/tests/bugs/shard/parallel-truncate-read.t +++ b/tests/bugs/shard/parallel-truncate-read.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #This test will crash if shard's LRU contains a shard's inode even after the #inode is forgotten. Minimum time for crash to happen I saw was 180 seconds diff --git a/tests/bugs/shard/shard-append-test.t b/tests/bugs/shard/shard-append-test.t index f8719f2a2c1..e35604af771 100644 --- a/tests/bugs/shard/shard-append-test.t +++ b/tests/bugs/shard/shard-append-test.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/shard-inode-refcount-test.t b/tests/bugs/shard/shard-inode-refcount-test.t index 3fd181be690..b85b258aa63 100644 --- a/tests/bugs/shard/shard-inode-refcount-test.t +++ b/tests/bugs/shard/shard-inode-refcount-test.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/unlinks-and-renames.t b/tests/bugs/shard/unlinks-and-renames.t index 3280fcba09f..c199b154345 100644 --- a/tests/bugs/shard/unlinks-and-renames.t +++ b/tests/bugs/shard/unlinks-and-renames.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/shard/zero-flag.t b/tests/bugs/shard/zero-flag.t index 1f39787ab9f..4989aafc6a5 100644 --- a/tests/bugs/shard/zero-flag.t +++ b/tests/bugs/shard/zero-flag.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1045333-zfs.t b/tests/bugs/snapshot/bug-1045333-zfs.t index 32019538064..e369c58d6b1 100644 --- a/tests/bugs/snapshot/bug-1045333-zfs.t +++ b/tests/bugs/snapshot/bug-1045333-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1045333.t b/tests/bugs/snapshot/bug-1045333.t index 6c0b995b5b0..fd23044066b 100755 --- a/tests/bugs/snapshot/bug-1045333.t +++ b/tests/bugs/snapshot/bug-1045333.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1049834-zfs.t b/tests/bugs/snapshot/bug-1049834-zfs.t index 1e0007f1cfe..9da0a6602a7 100644 --- a/tests/bugs/snapshot/bug-1049834-zfs.t +++ b/tests/bugs/snapshot/bug-1049834-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1049834.t b/tests/bugs/snapshot/bug-1049834.t index 06507567d1c..a319a830b69 100755 --- a/tests/bugs/snapshot/bug-1049834.t +++ b/tests/bugs/snapshot/bug-1049834.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1064768.t b/tests/bugs/snapshot/bug-1064768.t index c95ec64414b..aa34d36fac6 100644 --- a/tests/bugs/snapshot/bug-1064768.t +++ b/tests/bugs/snapshot/bug-1064768.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1087203-zfs.t b/tests/bugs/snapshot/bug-1087203-zfs.t index 102e4e8ff8a..cf3329185a5 100644 --- a/tests/bugs/snapshot/bug-1087203-zfs.t +++ b/tests/bugs/snapshot/bug-1087203-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1087203.t b/tests/bugs/snapshot/bug-1087203.t index 035be098576..1f9f5ed4315 100644 --- a/tests/bugs/snapshot/bug-1087203.t +++ b/tests/bugs/snapshot/bug-1087203.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1090042-zfs.t b/tests/bugs/snapshot/bug-1090042-zfs.t index adaf6e718ce..f370e2d07f2 100644 --- a/tests/bugs/snapshot/bug-1090042-zfs.t +++ b/tests/bugs/snapshot/bug-1090042-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1090042.t b/tests/bugs/snapshot/bug-1090042.t index b2c41c3ef21..920a8156b91 100755 --- a/tests/bugs/snapshot/bug-1090042.t +++ b/tests/bugs/snapshot/bug-1090042.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1109770-zfs.t b/tests/bugs/snapshot/bug-1109770-zfs.t index 0e849073b21..758236d9a4f 100644 --- a/tests/bugs/snapshot/bug-1109770-zfs.t +++ b/tests/bugs/snapshot/bug-1109770-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1109770.t b/tests/bugs/snapshot/bug-1109770.t index 22511995937..e63249bbb12 100644 --- a/tests/bugs/snapshot/bug-1109770.t +++ b/tests/bugs/snapshot/bug-1109770.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1109889-zfs.t b/tests/bugs/snapshot/bug-1109889-zfs.t index 264e19167c5..4e007b5f38f 100644 --- a/tests/bugs/snapshot/bug-1109889-zfs.t +++ b/tests/bugs/snapshot/bug-1109889-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1109889.t b/tests/bugs/snapshot/bug-1109889.t index 5fdc7dc9506..e3de76b8e58 100644 --- a/tests/bugs/snapshot/bug-1109889.t +++ b/tests/bugs/snapshot/bug-1109889.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1111041.t b/tests/bugs/snapshot/bug-1111041.t index efda9688d8b..c80d5a49b40 100755 --- a/tests/bugs/snapshot/bug-1111041.t +++ b/tests/bugs/snapshot/bug-1111041.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1112613-zfs.t b/tests/bugs/snapshot/bug-1112613-zfs.t index 22959803f2c..0f8bfef6d9e 100644 --- a/tests/bugs/snapshot/bug-1112613-zfs.t +++ b/tests/bugs/snapshot/bug-1112613-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1112613.t b/tests/bugs/snapshot/bug-1112613.t index e566de056bc..d1b05dc0bca 100644 --- a/tests/bugs/snapshot/bug-1112613.t +++ b/tests/bugs/snapshot/bug-1112613.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1113975-zfs.t b/tests/bugs/snapshot/bug-1113975-zfs.t index e9a4d5628bf..7eb94e3438a 100644 --- a/tests/bugs/snapshot/bug-1113975-zfs.t +++ b/tests/bugs/snapshot/bug-1113975-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1113975.t b/tests/bugs/snapshot/bug-1113975.t index 86c1739fb46..7c00c930d56 100644 --- a/tests/bugs/snapshot/bug-1113975.t +++ b/tests/bugs/snapshot/bug-1113975.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots-zfs.t b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots-zfs.t index 4e259afd15b..45dc6d0761f 100644 --- a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots-zfs.t +++ b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t index c5a285eb775..dd8e0238bec 100644 --- a/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t +++ b/tests/bugs/snapshot/bug-1155042-dont-display-deactivated-snapshots.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1157991-zfs.t b/tests/bugs/snapshot/bug-1157991-zfs.t index a78b9078e94..109a2c83fb8 100644 --- a/tests/bugs/snapshot/bug-1157991-zfs.t +++ b/tests/bugs/snapshot/bug-1157991-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1157991.t b/tests/bugs/snapshot/bug-1157991.t index f626ef2b705..f81e474cdb6 100755 --- a/tests/bugs/snapshot/bug-1157991.t +++ b/tests/bugs/snapshot/bug-1157991.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1162462-zfs.t b/tests/bugs/snapshot/bug-1162462-zfs.t index c01b5617df7..e7ab03b92e8 100644 --- a/tests/bugs/snapshot/bug-1162462-zfs.t +++ b/tests/bugs/snapshot/bug-1162462-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1162462.t b/tests/bugs/snapshot/bug-1162462.t index 5c2e4fe37f0..a9dc697cc6b 100755 --- a/tests/bugs/snapshot/bug-1162462.t +++ b/tests/bugs/snapshot/bug-1162462.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1162498-zfs.t b/tests/bugs/snapshot/bug-1162498-zfs.t index 65683ad4240..e4cac96450d 100644 --- a/tests/bugs/snapshot/bug-1162498-zfs.t +++ b/tests/bugs/snapshot/bug-1162498-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1162498.t b/tests/bugs/snapshot/bug-1162498.t index a97e4429ee7..fa9a450b347 100755 --- a/tests/bugs/snapshot/bug-1162498.t +++ b/tests/bugs/snapshot/bug-1162498.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1166197-zfs.t b/tests/bugs/snapshot/bug-1166197-zfs.t index 895dab709d2..869a5cf24f3 100644 --- a/tests/bugs/snapshot/bug-1166197-zfs.t +++ b/tests/bugs/snapshot/bug-1166197-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1166197.t b/tests/bugs/snapshot/bug-1166197.t index b070ae271ba..a05c401c44b 100755 --- a/tests/bugs/snapshot/bug-1166197.t +++ b/tests/bugs/snapshot/bug-1166197.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access-zfs.t b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access-zfs.t index 732ab673018..eee43dc3404 100644 --- a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access-zfs.t +++ b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t index 52a7a790b97..994fc1ffaa1 100644 --- a/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t +++ b/tests/bugs/snapshot/bug-1167580-set-proper-uid-and-gid-during-nfs-access.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1168875-zfs.t b/tests/bugs/snapshot/bug-1168875-zfs.t index d7b11f73ae1..44d2e221065 100644 --- a/tests/bugs/snapshot/bug-1168875-zfs.t +++ b/tests/bugs/snapshot/bug-1168875-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1168875.t b/tests/bugs/snapshot/bug-1168875.t index 9737784fd84..10bc0827448 100644 --- a/tests/bugs/snapshot/bug-1168875.t +++ b/tests/bugs/snapshot/bug-1168875.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1178079.t b/tests/bugs/snapshot/bug-1178079.t index a1a6b0b9d49..7dc44e13329 100644 --- a/tests/bugs/snapshot/bug-1178079.t +++ b/tests/bugs/snapshot/bug-1178079.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore-zfs.t b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore-zfs.t index 5baaed686ec..dc1c8892508 100644 --- a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore-zfs.t +++ b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t index 9d2864515a5..eb66a703324 100644 --- a/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t +++ b/tests/bugs/snapshot/bug-1202436-calculate-quota-cksum-during-snap-restore.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1205592-zfs.t b/tests/bugs/snapshot/bug-1205592-zfs.t index 1005663d919..37ec6eb34df 100644 --- a/tests/bugs/snapshot/bug-1205592-zfs.t +++ b/tests/bugs/snapshot/bug-1205592-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1205592.t b/tests/bugs/snapshot/bug-1205592.t index fc5b27a3a4f..73ef26b4e46 100644 --- a/tests/bugs/snapshot/bug-1205592.t +++ b/tests/bugs/snapshot/bug-1205592.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1227646-zfs.t b/tests/bugs/snapshot/bug-1227646-zfs.t index 9d9d4c68dcc..7913eadf531 100644 --- a/tests/bugs/snapshot/bug-1227646-zfs.t +++ b/tests/bugs/snapshot/bug-1227646-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1227646.t b/tests/bugs/snapshot/bug-1227646.t index f103a539c85..bd9ff2b7b87 100644 --- a/tests/bugs/snapshot/bug-1227646.t +++ b/tests/bugs/snapshot/bug-1227646.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1232430-zfs.t b/tests/bugs/snapshot/bug-1232430-zfs.t index 16cbe75c39f..14e29a5cb25 100644 --- a/tests/bugs/snapshot/bug-1232430-zfs.t +++ b/tests/bugs/snapshot/bug-1232430-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1232430.t b/tests/bugs/snapshot/bug-1232430.t index 50411b1dbfc..eaed30531c1 100755 --- a/tests/bugs/snapshot/bug-1232430.t +++ b/tests/bugs/snapshot/bug-1232430.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1250387-zfs.t b/tests/bugs/snapshot/bug-1250387-zfs.t index c3a28411508..4681377ae59 100644 --- a/tests/bugs/snapshot/bug-1250387-zfs.t +++ b/tests/bugs/snapshot/bug-1250387-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1250387.t b/tests/bugs/snapshot/bug-1250387.t index c9039e37f73..abb7c8b7dc0 100755 --- a/tests/bugs/snapshot/bug-1250387.t +++ b/tests/bugs/snapshot/bug-1250387.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1260848.t b/tests/bugs/snapshot/bug-1260848.t index 6455d8297b2..9d8884bf698 100644 --- a/tests/bugs/snapshot/bug-1260848.t +++ b/tests/bugs/snapshot/bug-1260848.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../nfs.rc diff --git a/tests/bugs/snapshot/bug-1275616-zfs.t b/tests/bugs/snapshot/bug-1275616-zfs.t index 693aa20c94a..f20823f28b4 100644 --- a/tests/bugs/snapshot/bug-1275616-zfs.t +++ b/tests/bugs/snapshot/bug-1275616-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1275616.t b/tests/bugs/snapshot/bug-1275616.t index dcaeae30f90..40d10f36ffd 100755 --- a/tests/bugs/snapshot/bug-1275616.t +++ b/tests/bugs/snapshot/bug-1275616.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1279327-zfs.t b/tests/bugs/snapshot/bug-1279327-zfs.t index 8e0a0435b6e..acac2023c58 100644 --- a/tests/bugs/snapshot/bug-1279327-zfs.t +++ b/tests/bugs/snapshot/bug-1279327-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1279327.t b/tests/bugs/snapshot/bug-1279327.t index 4e4be6eeea6..deaa084eb24 100644 --- a/tests/bugs/snapshot/bug-1279327.t +++ b/tests/bugs/snapshot/bug-1279327.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../snapshot.rc diff --git a/tests/bugs/snapshot/bug-1316437-zfs.t b/tests/bugs/snapshot/bug-1316437-zfs.t index 2c09dd5403d..2f3cc0bb8a9 100644 --- a/tests/bugs/snapshot/bug-1316437-zfs.t +++ b/tests/bugs/snapshot/bug-1316437-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1316437.t b/tests/bugs/snapshot/bug-1316437.t index 300c03c97f5..5e2815ff717 100644 --- a/tests/bugs/snapshot/bug-1316437.t +++ b/tests/bugs/snapshot/bug-1316437.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot-zfs.t b/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot-zfs.t index adb85d7fe9f..63867c6b431 100644 --- a/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot-zfs.t +++ b/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot.t b/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot.t index 3e851d69ce3..89417a6aac6 100644 --- a/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot.t +++ b/tests/bugs/snapshot/bug-1322772-real-path-fix-for-snapshot.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1399598-uss-with-ssl-zfs.t b/tests/bugs/snapshot/bug-1399598-uss-with-ssl-zfs.t index 5e4e0a0c799..46e83629760 100644 --- a/tests/bugs/snapshot/bug-1399598-uss-with-ssl-zfs.t +++ b/tests/bugs/snapshot/bug-1399598-uss-with-ssl-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1399598-uss-with-ssl.t b/tests/bugs/snapshot/bug-1399598-uss-with-ssl.t index f4e4e6ec4d2..de5a70d4655 100755 --- a/tests/bugs/snapshot/bug-1399598-uss-with-ssl.t +++ b/tests/bugs/snapshot/bug-1399598-uss-with-ssl.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path-zfs.t b/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path-zfs.t index 0cd8ed1aa96..2aa9fb69cb1 100644 --- a/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path-zfs.t +++ b/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path.t b/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path.t index 10ebc104518..387daf67daf 100644 --- a/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path.t +++ b/tests/bugs/snapshot/bug-1482023-snpashot-issue-with-other-processes-accessing-mounted-path.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset-zfs.t b/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset-zfs.t index a504581b886..f264e4b380f 100644 --- a/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset-zfs.t +++ b/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset.t b/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset.t index d9dd39aeced..805d72d2aee 100644 --- a/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset.t +++ b/tests/bugs/snapshot/bug-1512451-snapshot-creation-failed-after-brick-reset.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../cluster.rc diff --git a/tests/bugs/snapshot/bug-1597662-zfs.t b/tests/bugs/snapshot/bug-1597662-zfs.t index 2988a3b9d80..1399ac73bbc 100644 --- a/tests/bugs/snapshot/bug-1597662-zfs.t +++ b/tests/bugs/snapshot/bug-1597662-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1597662.t b/tests/bugs/snapshot/bug-1597662.t index f582930476a..501984f8038 100644 --- a/tests/bugs/snapshot/bug-1597662.t +++ b/tests/bugs/snapshot/bug-1597662.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import-zfs.t b/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import-zfs.t index 80d99225516..6ffe1e979ed 100644 --- a/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import-zfs.t +++ b/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import-zfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import.t b/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import.t index a2c004e435e..4d5f305447c 100644 --- a/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import.t +++ b/tests/bugs/snapshot/bug-1618004-fix-memory-corruption-in-snap-import.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/trace/bug-797171.t b/tests/bugs/trace/bug-797171.t index b823e477229..fc6ba69210d 100755 --- a/tests/bugs/trace/bug-797171.t +++ b/tests/bugs/trace/bug-797171.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/transport/bug-873367.t b/tests/bugs/transport/bug-873367.t index a18cde6ce71..15caec3d1ab 100755 --- a/tests/bugs/transport/bug-873367.t +++ b/tests/bugs/transport/bug-873367.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/unclassified/bug-1034085.t b/tests/bugs/unclassified/bug-1034085.t index 5df7cd26c82..3898713615b 100644 --- a/tests/bugs/unclassified/bug-1034085.t +++ b/tests/bugs/unclassified/bug-1034085.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test case: Check the creation of indices/xattrop dir as soon as brick comes up. . $(dirname $0)/../../include.rc diff --git a/tests/bugs/unclassified/bug-1357397.t b/tests/bugs/unclassified/bug-1357397.t index e2ec6f4d253..3ec92ac3667 100644 --- a/tests/bugs/unclassified/bug-1357397.t +++ b/tests/bugs/unclassified/bug-1357397.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/unclassified/bug-874498.t b/tests/bugs/unclassified/bug-874498.t index 2aa9b168a8a..3c320f8eaba 100644 --- a/tests/bugs/unclassified/bug-874498.t +++ b/tests/bugs/unclassified/bug-874498.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc . $(dirname $0)/../../afr.rc diff --git a/tests/bugs/unclassified/bug-991622.t b/tests/bugs/unclassified/bug-991622.t index 17b37a7767d..48248ed91fe 100644 --- a/tests/bugs/unclassified/bug-991622.t +++ b/tests/bugs/unclassified/bug-991622.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/upcall/bug-1227204.t b/tests/bugs/upcall/bug-1227204.t index fc393b1837f..d5822f3b595 100755 --- a/tests/bugs/upcall/bug-1227204.t +++ b/tests/bugs/upcall/bug-1227204.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This regression test tries to ensure that quota limit-usage set work with # features.cache-invalidation on. diff --git a/tests/bugs/upcall/bug-1369430.t b/tests/bugs/upcall/bug-1369430.t index f53c17a1495..d9e12359e1a 100755 --- a/tests/bugs/upcall/bug-1369430.t +++ b/tests/bugs/upcall/bug-1369430.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/upcall/bug-1394131.t b/tests/bugs/upcall/bug-1394131.t index b371ce4e682..b4cc8f53d64 100755 --- a/tests/bugs/upcall/bug-1394131.t +++ b/tests/bugs/upcall/bug-1394131.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/upcall/bug-1422776.t b/tests/bugs/upcall/bug-1422776.t index cb249ce1cd2..7ed04b8ea77 100755 --- a/tests/bugs/upcall/bug-1422776.t +++ b/tests/bugs/upcall/bug-1422776.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/upcall/bug-1458127.t b/tests/bugs/upcall/bug-1458127.t index e844f37f1d3..55b9736d823 100755 --- a/tests/bugs/upcall/bug-1458127.t +++ b/tests/bugs/upcall/bug-1458127.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/upcall/bug-upcall-stat.t b/tests/bugs/upcall/bug-upcall-stat.t index 0ba944ec441..d460835550c 100755 --- a/tests/bugs/upcall/bug-upcall-stat.t +++ b/tests/bugs/upcall/bug-upcall-stat.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/write-behind/bug-1058663.t b/tests/bugs/write-behind/bug-1058663.t index a900a6d7afa..575866f25ac 100644 --- a/tests/bugs/write-behind/bug-1058663.t +++ b/tests/bugs/write-behind/bug-1058663.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/write-behind/bug-1279730.t b/tests/bugs/write-behind/bug-1279730.t index 20447c349d5..eec7bb95f01 100755 --- a/tests/bugs/write-behind/bug-1279730.t +++ b/tests/bugs/write-behind/bug-1279730.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/bugs/write-behind/issue-884.t b/tests/bugs/write-behind/issue-884.t index f72733d729c..c19974d4723 100755 --- a/tests/bugs/write-behind/issue-884.t +++ b/tests/bugs/write-behind/issue-884.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/cleanup.sh b/tests/cleanup.sh index 29fd6929fac..359b0db10d9 100644 --- a/tests/cleanup.sh +++ b/tests/cleanup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/include.rc cleanup diff --git a/tests/cluster.rc b/tests/cluster.rc index 6282b153eaa..244182f127d 100644 --- a/tests/cluster.rc +++ b/tests/cluster.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash CLUSTER_PFX="127.1.1"; # ".x" for each glusterd CLUSTER_COUNT=1; # Just initial definition diff --git a/tests/dht.rc b/tests/dht.rc index de0d7651ec8..f823fe28084 100644 --- a/tests/dht.rc +++ b/tests/dht.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash dhthashdebugxattr="dht.file.hashed-subvol." diff --git a/tests/ec.rc b/tests/ec.rc index f18752fc99a..42f2ead23d3 100644 --- a/tests/ec.rc +++ b/tests/ec.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function ec_up_status() { diff --git a/tests/fallocate.rc b/tests/fallocate.rc index d117ba9c051..944703d26de 100644 --- a/tests/fallocate.rc +++ b/tests/fallocate.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Helper to verify a given fallocate command is supported and skip a test # otherwise. Older versions of the fallocate utility might not support all modes diff --git a/tests/features/delay-gen.t b/tests/features/delay-gen.t index ad6096ce5c0..f5649585e43 100755 --- a/tests/features/delay-gen.t +++ b/tests/features/delay-gen.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/flock_interrupt.t b/tests/features/flock_interrupt.t index 1899d57c5a7..774cb9a4af6 100644 --- a/tests/features/flock_interrupt.t +++ b/tests/features/flock_interrupt.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/fuse-lru-limit.t b/tests/features/fuse-lru-limit.t index dd6be2d5397..b9c85a87577 100644 --- a/tests/features/fuse-lru-limit.t +++ b/tests/features/fuse-lru-limit.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/glfs-lease.t b/tests/features/glfs-lease.t index ea2ae92a2bb..2b1b931a37b 100755 --- a/tests/features/glfs-lease.t +++ b/tests/features/glfs-lease.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/index/index-link-count-lifecycle.t b/tests/features/index/index-link-count-lifecycle.t index 618a0f712d9..84374f6552b 100644 --- a/tests/features/index/index-link-count-lifecycle.t +++ b/tests/features/index/index-link-count-lifecycle.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Index link-count lifecycle tests . $(dirname $0)/../../include.rc diff --git a/tests/features/interrupt.t b/tests/features/interrupt.t index e5fe63704c1..87e73c99880 100644 --- a/tests/features/interrupt.t +++ b/tests/features/interrupt.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ##Copy this file to tests/bugs before running run.sh (cp extras/test/bug-920583.t tests/bugs/) diff --git a/tests/features/ipc.t b/tests/features/ipc.t index 31b051642f2..4c5e22b3440 100755 --- a/tests/features/ipc.t +++ b/tests/features/ipc.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc diff --git a/tests/features/lock_revocation.t b/tests/features/lock_revocation.t index 67bc13159f9..b6b97b19b27 100644 --- a/tests/features/lock_revocation.t +++ b/tests/features/lock_revocation.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash logdir=$(gluster --print-logdir) BRICK_LOGFILES="$logdir/bricks/d-backends-brick?.log" rm -f $BRICK_LOGFILES &> /dev/null diff --git a/tests/features/mandatory-lock-forced.t b/tests/features/mandatory-lock-forced.t index 563669c6774..5ad0b9559cd 100644 --- a/tests/features/mandatory-lock-forced.t +++ b/tests/features/mandatory-lock-forced.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/nuke.t b/tests/features/nuke.t index f1f5f9f90ab..c934229a612 100755 --- a/tests/features/nuke.t +++ b/tests/features/nuke.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc diff --git a/tests/features/readdir-ahead.t b/tests/features/readdir-ahead.t index 75223df61bf..f7581b2bb2f 100755 --- a/tests/features/readdir-ahead.t +++ b/tests/features/readdir-ahead.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test basic readdir-ahead functionality. Verify that readdir-ahead can be # enabled, create a set of files and run some ls tests. diff --git a/tests/features/simple-quota-dht.t b/tests/features/simple-quota-dht.t index 7a279f38b98..57486ad136b 100755 --- a/tests/features/simple-quota-dht.t +++ b/tests/features/simple-quota-dht.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/simple-quota.t b/tests/features/simple-quota.t index 24e09b6c6e5..b72ef0f1ff2 100755 --- a/tests/features/simple-quota.t +++ b/tests/features/simple-quota.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/ssl-authz.t b/tests/features/ssl-authz.t index 27bd6249ed2..7872ea03835 100755 --- a/tests/features/ssl-authz.t +++ b/tests/features/ssl-authz.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/ssl-ciphers.t b/tests/features/ssl-ciphers.t index 53b6995575a..b54cac98c3a 100644 --- a/tests/features/ssl-ciphers.t +++ b/tests/features/ssl-ciphers.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/subdir-mount.t b/tests/features/subdir-mount.t index a02bd6befc4..c6f23d067bf 100644 --- a/tests/features/subdir-mount.t +++ b/tests/features/subdir-mount.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../nfs.rc diff --git a/tests/features/trash.t b/tests/features/trash.t index da5b50bc85a..5bf5a8b0261 100755 --- a/tests/features/trash.t +++ b/tests/features/trash.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/unhashed-auto.t b/tests/features/unhashed-auto.t index 0a6bbfbb07d..5760945e56a 100755 --- a/tests/features/unhashed-auto.t +++ b/tests/features/unhashed-auto.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/volspec/test.t b/tests/features/volspec/test.t index 51728c75624..ded42857d70 100644 --- a/tests/features/volspec/test.t +++ b/tests/features/volspec/test.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../../include.rc . $(dirname $0)/../../volume.rc diff --git a/tests/features/weighted-rebalance.t b/tests/features/weighted-rebalance.t index 0d730406fd0..c0b09903133 100755 --- a/tests/features/weighted-rebalance.t +++ b/tests/features/weighted-rebalance.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/worm.t b/tests/features/worm.t index 8208f2c1696..10f764e21ba 100755 --- a/tests/features/worm.t +++ b/tests/features/worm.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/features/worm_sh.t b/tests/features/worm_sh.t index da7afc084b2..3f275646235 100644 --- a/tests/features/worm_sh.t +++ b/tests/features/worm_sh.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc cleanup; diff --git a/tests/fileio.rc b/tests/fileio.rc index ec0767832e8..325d6e6617f 100644 --- a/tests/fileio.rc +++ b/tests/fileio.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function fd_available() { for i in {1..65536}; do diff --git a/tests/gfid2path/block-mount-access.t b/tests/gfid2path/block-mount-access.t index b1726ad9604..59c9b1f4f9e 100644 --- a/tests/gfid2path/block-mount-access.t +++ b/tests/gfid2path/block-mount-access.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/gfid2path/get-gfid-to-path.t b/tests/gfid2path/get-gfid-to-path.t index dea95f4c9f8..2133d273bba 100644 --- a/tests/gfid2path/get-gfid-to-path.t +++ b/tests/gfid2path/get-gfid-to-path.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/gfid2path/gfid2path_fuse.t b/tests/gfid2path/gfid2path_fuse.t index 489360a2555..8b0dfb7350e 100644 --- a/tests/gfid2path/gfid2path_fuse.t +++ b/tests/gfid2path/gfid2path_fuse.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/gfid2path/gfid2path_nfs.t b/tests/gfid2path/gfid2path_nfs.t index 4495c5761b7..8ed7fb72520 100644 --- a/tests/gfid2path/gfid2path_nfs.t +++ b/tests/gfid2path/gfid2path_nfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/glusterfind/glusterfind-basic.t b/tests/glusterfind/glusterfind-basic.t index ccb33fb1fc8..6e05f624bd0 100644 --- a/tests/glusterfind/glusterfind-basic.t +++ b/tests/glusterfind/glusterfind-basic.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/afr-heal-info.t b/tests/line-coverage/afr-heal-info.t index eb37e9a7350..82a432bc923 100644 --- a/tests/line-coverage/afr-heal-info.t +++ b/tests/line-coverage/afr-heal-info.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Test that parallel heal-info command execution doesn't result in spurious #entries with locking-scheme granular diff --git a/tests/line-coverage/arbiter-coverage.t b/tests/line-coverage/arbiter-coverage.t index 82b470141b5..5d8586bc687 100755 --- a/tests/line-coverage/arbiter-coverage.t +++ b/tests/line-coverage/arbiter-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc diff --git a/tests/line-coverage/cli-negative-case-and-function-coverage.t b/tests/line-coverage/cli-negative-case-and-function-coverage.t index 9ce7ebf6df3..e3f127e5103 100644 --- a/tests/line-coverage/cli-negative-case-and-function-coverage.t +++ b/tests/line-coverage/cli-negative-case-and-function-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/cli-peer-and-volume-operations.t b/tests/line-coverage/cli-peer-and-volume-operations.t index 0cf8dbe81f9..8660b5eace3 100644 --- a/tests/line-coverage/cli-peer-and-volume-operations.t +++ b/tests/line-coverage/cli-peer-and-volume-operations.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../cluster.rc diff --git a/tests/line-coverage/cli-volume-top-profile-coverage.t b/tests/line-coverage/cli-volume-top-profile-coverage.t index 35713c26faa..de136f7afcd 100644 --- a/tests/line-coverage/cli-volume-top-profile-coverage.t +++ b/tests/line-coverage/cli-volume-top-profile-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../cluster.rc diff --git a/tests/line-coverage/errorgen-coverage.t b/tests/line-coverage/errorgen-coverage.t index f4622428d79..39aa7097298 100755 --- a/tests/line-coverage/errorgen-coverage.t +++ b/tests/line-coverage/errorgen-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc diff --git a/tests/line-coverage/glusterd-coverage.t b/tests/line-coverage/glusterd-coverage.t index 68120c3e19e..4a7c7533768 100644 --- a/tests/line-coverage/glusterd-coverage.t +++ b/tests/line-coverage/glusterd-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/log-and-brick-ops-negative-case.t b/tests/line-coverage/log-and-brick-ops-negative-case.t index d86cb452282..62f4cd1475d 100644 --- a/tests/line-coverage/log-and-brick-ops-negative-case.t +++ b/tests/line-coverage/log-and-brick-ops-negative-case.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/meta-max-coverage.t b/tests/line-coverage/meta-max-coverage.t index 1cc07610aa7..c183eb57621 100755 --- a/tests/line-coverage/meta-max-coverage.t +++ b/tests/line-coverage/meta-max-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/namespace-linecoverage.t b/tests/line-coverage/namespace-linecoverage.t index 8de6a0f279b..3e41927182d 100644 --- a/tests/line-coverage/namespace-linecoverage.t +++ b/tests/line-coverage/namespace-linecoverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/quiesce-coverage.t b/tests/line-coverage/quiesce-coverage.t index ca29343451e..ff751ff9ef9 100755 --- a/tests/line-coverage/quiesce-coverage.t +++ b/tests/line-coverage/quiesce-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/shard-coverage.t b/tests/line-coverage/shard-coverage.t index 1797999c146..767137f95f8 100644 --- a/tests/line-coverage/shard-coverage.t +++ b/tests/line-coverage/shard-coverage.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/some-features-in-libglusterfs.t b/tests/line-coverage/some-features-in-libglusterfs.t index 5719c4e039c..61b64de5b86 100644 --- a/tests/line-coverage/some-features-in-libglusterfs.t +++ b/tests/line-coverage/some-features-in-libglusterfs.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/line-coverage/volfile-with-all-graph-syntax.t b/tests/line-coverage/volfile-with-all-graph-syntax.t index b137432cceb..d91a1f39ec5 100644 --- a/tests/line-coverage/volfile-with-all-graph-syntax.t +++ b/tests/line-coverage/volfile-with-all-graph-syntax.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/nfs.rc b/tests/nfs.rc index 2140f311c33..0997bf67461 100644 --- a/tests/nfs.rc +++ b/tests/nfs.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Due to portmap registration NFS takes some time to # export all volumes. Therefore tests should start only diff --git a/tests/performance/open-behind.t b/tests/performance/open-behind.t index 002a98a8352..6c16bcadcd3 100755 --- a/tests/performance/open-behind.t +++ b/tests/performance/open-behind.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc . $(dirname $0)/../volume.rc diff --git a/tests/performance/quick-read.t b/tests/performance/quick-read.t index 26ec175df0d..0fec1cb9e56 100644 --- a/tests/performance/quick-read.t +++ b/tests/performance/quick-read.t @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . $(dirname $0)/../include.rc diff --git a/tests/snapshot.rc b/tests/snapshot.rc index 9aedf7d0aee..0d7a26fb2b1 100644 --- a/tests/snapshot.rc +++ b/tests/snapshot.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash LVM_DEFINED=0 # Replace any '-' by '_' to avoid that device manager modifies the name of diff --git a/tests/snapshot_zfs.rc b/tests/snapshot_zfs.rc index 88f3fa54499..4d6785fe918 100644 --- a/tests/snapshot_zfs.rc +++ b/tests/snapshot_zfs.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ZFS_DEFINED=0 # Replace any '-' by '_' to avoid that device manager modifies the name of diff --git a/tests/ssl.rc b/tests/ssl.rc index 3c24ad9efb2..3899d22df3c 100644 --- a/tests/ssl.rc +++ b/tests/ssl.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash SSL_KEY=$SSL_CERT_PATH/glusterfs.key SSL_CERT=$SSL_CERT_PATH/glusterfs.pem diff --git a/tests/traps.rc b/tests/traps.rc index f011960c97e..786d2df046e 100644 --- a/tests/traps.rc +++ b/tests/traps.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Make sure this only gets included/executed once. Unfortunately, bash doesn't # usually distinguish between values that are unset and values that are null. diff --git a/tests/utils/testn.sh b/tests/utils/testn.sh index 079351d8529..b7befc34eb3 100755 --- a/tests/utils/testn.sh +++ b/tests/utils/testn.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash # # Use this script to identify the command and line-number of test-cases. # -if [ -z "${1}" -a -z "${2}" ] +if [ -z "${1}" ] && [ -z "${2}" ] then echo "Usage: ${0} path/to/test/case.t testnumber" exit 1 @@ -13,4 +13,4 @@ then exit 2 fi -awk '{print FNR " " $0}' ${1} | egrep '^[[:digit:]]+[[:space:]]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)' | sed -n ${2}p +awk '{print FNR " " $0}' "${1}" | grep -E '^[[:digit:]]+[[:space:]]*(EXPECT|TEST|EXPECT_WITHIN|EXPECT_KEYWORD)' | sed -n "${2}p" diff --git a/tools/gfind_missing_files/gfid_to_path.sh b/tools/gfind_missing_files/gfid_to_path.sh index ebe817ac2f3..97e94508557 100644 --- a/tools/gfind_missing_files/gfid_to_path.sh +++ b/tools/gfind_missing_files/gfid_to_path.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bun/env bash ## Copyright (c) 2015 Red Hat, Inc. ## This file is part of GlusterFS. diff --git a/tools/gfind_missing_files/gfind_missing_files.sh b/tools/gfind_missing_files/gfind_missing_files.sh index db9dd92d76b..d77b432b5fe 100644 --- a/tools/gfind_missing_files/gfind_missing_files.sh +++ b/tools/gfind_missing_files/gfind_missing_files.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## Copyright (c) 2015 Red Hat, Inc. ## This file is part of GlusterFS. diff --git a/tools/tests/centos7/user-data-prepare b/tools/tests/centos7/user-data-prepare index 134518cf277..a9d99ee7eb5 100644 --- a/tools/tests/centos7/user-data-prepare +++ b/tools/tests/centos7/user-data-prepare @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash touch /etc/cloud/cloud-init.disabled diff --git a/tools/tests/prove_run b/tools/tests/prove_run index d1a233aa2f4..970d9c0cc99 100755 --- a/tools/tests/prove_run +++ b/tools/tests/prove_run @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash set -u function reset() { - while pgrep gluster >/dev/null; do + while pgrep gluster >/dev/null ; do pkill -9 gluster sleep 0.1 done @@ -11,9 +11,9 @@ function reset() { findmnt -t fuse.glusterfs -o TARGET | tail -n +2 | xargs -r -n 1 umount mkdir -p /d/dev vgremove -fyS "vg_name=~_$(hostname -s)_" - for dev in $(ls /d/dev/ 2>/dev/null); do - losetup -d /d/dev/${dev} - rm -f /d/dev/${dev} + for dev in /d/dev/* ; do + losetup -d /d/dev/"${dev}" + rm -f /d/dev/"${dev}" done } diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index bd65563f4dc..3a24b95469a 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2013 Red Hat, Inc. # Copyright (c) 2015 ungleich GmbH @@ -40,7 +40,7 @@ _init () fi mounttab=/proc/mounts - uname_s=`uname -s` + uname_s=$(uname -s) case ${uname_s} in NetBSD) getinode="stat -f %i" @@ -109,9 +109,9 @@ parse_volfile_servers () local servers="" local new_servers="" - servers=$(echo ${server_list} | sed 's/,/ /g') + servers=$(echo "${server_list}" | sed 's/,/ /g') for server in ${servers}; do - is_valid_hostname ${server} + is_valid_hostname "${server}" if [ $? -eq 1 ]; then continue fi @@ -124,7 +124,7 @@ parse_volfile_servers () start_glusterfs () { if [ -n "$log_level_str" ]; then - case "$( echo $log_level_str | awk '{print toupper($0)}')" in + case "$( echo "${log_level_str}" | awk '{print toupper($0)}')" in "ERROR") log_level=$LOG_ERROR; ;; @@ -348,9 +348,9 @@ start_glusterfs () if [ -z "$volfile_loc" ]; then if [ -n "$server_ip" ]; then - servers=$(parse_volfile_servers ${server_ip}); + servers=$(parse_volfile_servers "${server_ip}"); if [ -n "$servers" ]; then - for i in $(echo ${servers}); do + for i in $(echo "${servers}"); do cmd_line=$(echo "$cmd_line --volfile-server=$i"); done else @@ -371,7 +371,7 @@ start_glusterfs () fi if [ -n "$backup_volfile_servers" ]; then - backup_servers=$(parse_backup_volfile_servers ${backup_volfile_servers}) + backup_servers=$(parse_backup_volfile_servers "${backup_volfile_servers}") syntax_status=$(echo ${backup_servers##*' '}) if [ "$syntax_status" = "SyntaxError" ]; then warn "ERROR: Invalid backup-volfile-servers specified.. exiting" @@ -462,7 +462,7 @@ check_recursive_mount () mnt_dir=${1%/}; if [ -n "${getfattr}" ]; then - ${getfattr} -n trusted.gfid $mnt_dir 2>/dev/null | grep -iq "trusted.gfid="; + ${getfattr} -n trusted.gfid "${mnt_dir}" 2>/dev/null | grep -iq "trusted.gfid="; if [ $? -eq 0 ]; then warn "ERROR: $mnt_dir is in use as a brick of a gluster volume"; exit 2; @@ -477,14 +477,14 @@ check_recursive_mount () return; fi - brick_path=`grep ^path "$GLUSTERD_WORKDIR"/vols/*/bricks/* 2>/dev/null | cut -d "=" -f 2`; - root_inode=`${lgetinode} /`; - root_dev=`${lgetdev} /`; - mnt_inode=`${lgetinode} $mnt_dir`; - mnt_dev=`${lgetdev} $mnt_dir`; - for brick in "$brick_path"; do + brick_path=$(grep ^path "$GLUSTERD_WORKDIR"/vols/*/bricks/* 2>/dev/null | cut -d "=" -f 2); + root_inode=$(${lgetinode} /); + root_dev=$(${lgetdev} /); + mnt_inode=$(${lgetinode} "${mnt_dir}"); + mnt_dev=$(${lgetdev} "${mnt_dir}"); + for brick in ${brick_path} ; do # evaluate brick path to see if this is local, if non-local, skip iteration - ls $brick > /dev/null 2>&1; + ls "${brick}" > /dev/null 2>&1; if [ $? -ne 0 ]; then continue; fi @@ -493,18 +493,18 @@ check_recursive_mount () ${getfattr} -n trusted.gfid "$brick" 2>/dev/null | grep -iq "trusted.gfid="; if [ $? -eq 0 ]; then # brick is local - while [ 1 ]; do + while true ; do tmp_brick="$brick"; brick="$brick"/..; - brick_dev=`${lgetdev} $brick`; - brick_inode=`${lgetinode} $brick`; - if [ "$mnt_inode" -eq "$brick_inode" \ - -a "$mnt_dev" -eq "$brick_dev" ]; then + brick_dev=$(${lgetdev} "${brick}"); + brick_inode=$(${lgetinode} "${brick}"); + if [ "$mnt_inode" -eq "${brick_inode}" ] \ + && [ "$mnt_dev" -eq "${brick_dev}" ]; then warn "ERROR: ${mnt_dir} is a parent of the brick ${tmp_brick}"; exit 2; fi - [ "$root_inode" -ne "$brick_inode" \ - -o "$root_dev" -ne "$brick_dev" ] || break; + [ "$root_inode" -ne "$brick_inode" ] || + [ "$root_dev" -ne "$brick_dev" ] || break; done; else continue; @@ -607,17 +607,17 @@ with_options() fuse_auto_invalidation=$value ;; "no-root-squash") - if [ $value = "yes" ] || - [ $value = "on" ] || - [ $value = "enable" ] || - [ $value = "true" ] ; then + if [ "${value}" = "yes" ] || + [ "${value}" = "on" ] || + [ "${value}" = "enable" ] || + [ "${value}" = "true" ] ; then no_root_squash=1; fi ;; "root-squash") - if [ $value = "no" ] || - [ $value = "off" ] || - [ $value = "disable" ] || - [ $value = "false" ] ; then + if [ "${value}" = "no" ] || + [ "${value}" = "off" ] || + [ "${value}" = "disable" ] || + [ "${value}" = "false" ] ; then no_root_squash=1; fi ;; "kernel-writeback-cache") @@ -756,13 +756,13 @@ without_options() parse_options() { local optarg=${1} - for pair in $(echo ${optarg}|sed 's/,/ /g'); do + for pair in $(echo "${optarg}"|sed 's/,/ /g'); do key=$(echo "$pair" | cut -f1 -d'='); value=$(echo "$pair" | cut -f2- -d'='); if [ "$key" = "$value" ]; then - without_options $pair; + without_options "${pair}"; else - with_options $key $value; + with_options "${key}" "${value}"; fi done } @@ -784,7 +784,7 @@ update_updatedb() main () { - if [ "x${uname_s}" = "xLinux" -a $# -ge 2 ] ; then + if [ "x${uname_s}" = "xLinux" ] && [ $# -ge 2 ] ; then volfile_loc=$1 mount_point=$2 @@ -795,7 +795,7 @@ main () case "${opt}" in o) parse_options ${OPTARG}; - shift 2; + shift 2; ;; n) ;; @@ -866,7 +866,7 @@ EOF # No need to do a ! -d test, it is taken care while initializing the # variable mount_point - [ -z "$mount_point" -o ! -d "$mount_point" ] && { + [ -z "$mount_point" ] || [ ! -d "$mount_point" ] && { cat <&2 ERROR: Mount point does not exist Please specify a mount point diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in index 970d9d47886..e22e8085559 100755 --- a/xlators/mount/fuse/utils/mount_glusterfs.in +++ b/xlators/mount/fuse/utils/mount_glusterfs.in @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # (C) 2014 Red Hat Inc. # (C) 2015 ungleich GmbH #