mirror of https://github.com/k3s-io/k3s
Fix shellcheck lint errors in test/images/volume/nfs/run_nfs.sh
parent
f795e22932
commit
5518defffc
|
@ -86,4 +86,3 @@
|
||||||
./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/nfs/run_nfs.sh
|
|
||||||
|
|
|
@ -22,21 +22,22 @@ function start()
|
||||||
while getopts "G:" opt; do
|
while getopts "G:" opt; do
|
||||||
case ${opt} in
|
case ${opt} in
|
||||||
G) gid=${OPTARG};;
|
G) gid=${OPTARG};;
|
||||||
|
*):;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
shift $(($OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
# prepare /etc/exports
|
# prepare /etc/exports
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
# fsid=0: needed for NFSv4
|
# fsid=0: needed for NFSv4
|
||||||
echo "$i *(rw,fsid=0,insecure,no_root_squash)" >> /etc/exports
|
echo "$i *(rw,fsid=0,insecure,no_root_squash)" >> /etc/exports
|
||||||
if [ -v gid ] ; then
|
if [ -v gid ] ; then
|
||||||
chmod 070 $i
|
chmod 070 "$i"
|
||||||
chgrp $gid $i
|
chgrp "$gid" "$i"
|
||||||
fi
|
fi
|
||||||
# move index.html to here
|
# move index.html to here
|
||||||
/bin/cp /tmp/index.html $i/
|
/bin/cp /tmp/index.html "$i/"
|
||||||
chmod 644 $i/index.html
|
chmod 644 "$i/index.html"
|
||||||
echo "Serving $i"
|
echo "Serving $i"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -67,7 +68,7 @@ function stop()
|
||||||
/usr/sbin/exportfs -au
|
/usr/sbin/exportfs -au
|
||||||
/usr/sbin/exportfs -f
|
/usr/sbin/exportfs -f
|
||||||
|
|
||||||
kill $( pidof rpc.mountd )
|
kill "$( pidof rpc.mountd )"
|
||||||
umount /proc/fs/nfsd
|
umount /proc/fs/nfsd
|
||||||
echo > /etc/exports
|
echo > /etc/exports
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue