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

This commit is contained in:
Bob Killen 2019-02-16 11:14:50 -05:00
parent ef8aa4fd7f
commit 346bcdaa27
No known key found for this signature in database
GPG Key ID: 03FB8A8615239E6D
2 changed files with 8 additions and 9 deletions

View File

@ -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

View File

@ -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
}