Fix shellcheck lint errors in test/images/volume/gluster/run_gluster.sh

parent ef8aa4fd
...@@ -86,6 +86,5 @@ ...@@ -86,6 +86,5 @@
./test/e2e_node/environment/setup_host.sh ./test/e2e_node/environment/setup_host.sh
./test/e2e_node/gubernator.sh ./test/e2e_node/gubernator.sh
./test/images/image-util.sh ./test/images/image-util.sh
./test/images/volume/gluster/run_gluster.sh
./test/images/volume/iscsi/create_block.sh ./test/images/volume/iscsi/create_block.sh
./test/images/volume/nfs/run_nfs.sh ./test/images/volume/nfs/run_nfs.sh
...@@ -14,24 +14,24 @@ ...@@ -14,24 +14,24 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
DIR=`mktemp -d` DIR="$(mktemp -d)"
function start() function start()
{ {
mount -t tmpfs test $DIR mount -t tmpfs test "$DIR"
chmod 755 $DIR chmod 755 "$DIR"
cp /vol/* $DIR/ cp /vol/* "$DIR/"
/usr/sbin/glusterd -p /run/glusterd.pid /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 gluster volume start test_vol
} }
function stop() function stop()
{ {
gluster --mode=script volume stop test_vol force gluster --mode=script volume stop test_vol force
kill $(cat /run/glusterd.pid) kill "$(cat /run/glusterd.pid)"
umount $DIR umount "$DIR"
rm -rf $DIR rm -rf "$DIR"
exit 0 exit 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment