Skip to content

Commit f795e22

Browse files
author
Bob Killen
committed
Fix shellcheck lint errors in test/images/volume/iscsi/create_block.sh
1 parent 346bcda commit f795e22

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

hack/.shellcheck_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,4 @@
8686
./test/e2e_node/environment/setup_host.sh
8787
./test/e2e_node/gubernator.sh
8888
./test/images/image-util.sh
89-
./test/images/volume/iscsi/create_block.sh
9089
./test/images/volume/nfs/run_nfs.sh

test/images/volume/iscsi/create_block.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
# Exit on the first error.
1818
set -e
1919

20-
MNTDIR=`mktemp -d`
20+
MNTDIR="$(mktemp -d)"
2121

2222
cleanup()
2323
{
2424
# Make sure we return the right exit code
2525
RET=$?
2626
# Silently remove everything and ignore errors
2727
set +e
28-
/bin/umount $MNTDIR 2>/dev/null
29-
/bin/rmdir $MNTDIR 2>/dev/null
28+
/bin/umount "$MNTDIR" 2>/dev/null
29+
/bin/rmdir "$MNTDIR" 2>/dev/null
3030
/bin/rm block 2>/dev/null
3131
exit $RET
3232
}
@@ -39,9 +39,9 @@ dd if=/dev/zero of=block seek=120 count=1 bs=1M
3939
mkfs.ext2 block
4040

4141
# Add index.html to it
42-
mount -o loop block $MNTDIR
43-
echo "Hello from iscsi" > $MNTDIR/index.html
44-
umount $MNTDIR
42+
mount -o loop block "$MNTDIR"
43+
echo "Hello from iscsi" > "$MNTDIR/index.html"
44+
umount "$MNTDIR"
4545

4646
rm block.tar.gz 2>/dev/null || :
4747
tar cfz block.tar.gz block

0 commit comments

Comments
 (0)