From 346bcdaa27ae2800f5e87eb21041badd55a040af Mon Sep 17 00:00:00 2001 From: Bob Killen Date: Sat, 16 Feb 2019 11:14:50 -0500 Subject: [PATCH] Fix shellcheck lint errors in test/images/volume/gluster/run_gluster.sh --- hack/.shellcheck_failures | 1 - test/images/volume/gluster/run_gluster.sh | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index ee2d7e7964f..3ae188c4106 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -86,6 +86,5 @@ ./test/e2e_node/environment/setup_host.sh ./test/e2e_node/gubernator.sh ./test/images/image-util.sh -./test/images/volume/gluster/run_gluster.sh ./test/images/volume/iscsi/create_block.sh ./test/images/volume/nfs/run_nfs.sh diff --git a/test/images/volume/gluster/run_gluster.sh b/test/images/volume/gluster/run_gluster.sh index 0cf5cb48c31..8d9430a0d48 100755 --- a/test/images/volume/gluster/run_gluster.sh +++ b/test/images/volume/gluster/run_gluster.sh @@ -14,24 +14,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -DIR=`mktemp -d` +DIR="$(mktemp -d)" function start() { - mount -t tmpfs test $DIR - chmod 755 $DIR - cp /vol/* $DIR/ + mount -t tmpfs test "$DIR" + chmod 755 "$DIR" + cp /vol/* "$DIR/" /usr/sbin/glusterd -p /run/glusterd.pid - gluster volume create test_vol `hostname -i`:$DIR force + gluster volume create test_vol "$(hostname -i):$DIR" force gluster volume start test_vol } function stop() { gluster --mode=script volume stop test_vol force - kill $(cat /run/glusterd.pid) - umount $DIR - rm -rf $DIR + kill "$(cat /run/glusterd.pid)" + umount "$DIR" + rm -rf "$DIR" exit 0 }