mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Fix shellcheck lint errors in test/images/volume/iscsi/create_block.sh
This commit is contained in:
parent
346bcdaa27
commit
f795e22932
@ -86,5 +86,4 @@
|
|||||||
./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/iscsi/create_block.sh
|
|
||||||
./test/images/volume/nfs/run_nfs.sh
|
./test/images/volume/nfs/run_nfs.sh
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# Exit on the first error.
|
# Exit on the first error.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
MNTDIR=`mktemp -d`
|
MNTDIR="$(mktemp -d)"
|
||||||
|
|
||||||
cleanup()
|
cleanup()
|
||||||
{
|
{
|
||||||
@ -25,8 +25,8 @@ cleanup()
|
|||||||
RET=$?
|
RET=$?
|
||||||
# Silently remove everything and ignore errors
|
# Silently remove everything and ignore errors
|
||||||
set +e
|
set +e
|
||||||
/bin/umount $MNTDIR 2>/dev/null
|
/bin/umount "$MNTDIR" 2>/dev/null
|
||||||
/bin/rmdir $MNTDIR 2>/dev/null
|
/bin/rmdir "$MNTDIR" 2>/dev/null
|
||||||
/bin/rm block 2>/dev/null
|
/bin/rm block 2>/dev/null
|
||||||
exit $RET
|
exit $RET
|
||||||
}
|
}
|
||||||
@ -39,9 +39,9 @@ dd if=/dev/zero of=block seek=120 count=1 bs=1M
|
|||||||
mkfs.ext2 block
|
mkfs.ext2 block
|
||||||
|
|
||||||
# Add index.html to it
|
# Add index.html to it
|
||||||
mount -o loop block $MNTDIR
|
mount -o loop block "$MNTDIR"
|
||||||
echo "Hello from iscsi" > $MNTDIR/index.html
|
echo "Hello from iscsi" > "$MNTDIR/index.html"
|
||||||
umount $MNTDIR
|
umount "$MNTDIR"
|
||||||
|
|
||||||
rm block.tar.gz 2>/dev/null || :
|
rm block.tar.gz 2>/dev/null || :
|
||||||
tar cfz block.tar.gz block
|
tar cfz block.tar.gz block
|
||||||
|
Loading…
Reference in New Issue
Block a user