Fix the type issue in rvtysh (#7648)

Why I did it
Change the type issue in the command rvtysh
change PARA/para to PARAM/param
This commit is contained in:
xumia 2021-05-20 21:35:23 +08:00 committed by GitHub
parent a9f6413eb5
commit 9387350e19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,14 +9,14 @@ if printf -- "$*" | grep -qPz '[\n\r|&$;]'; then
fi fi
# The sub commands must start with "show" # The sub commands must start with "show"
LAST_PARA= LAST_PARAM=
for para in "$@" for param in "$@"
do do
if [ "$LAST_PARA" == "-c" ] && [[ "$para" != show* ]]; then if [ "$LAST_PARAM" == "-c" ] && [[ "$param" != show* ]]; then
echo "Not allow to run the command '$para', please use the comand 'sudo vtysh' instead." 1>&2 echo "Not allow to run the command '$param', please use the comand 'sudo vtysh' instead." 1>&2
exit 1 exit 1
fi fi
LAST_PARA=$para LAST_PARAM=$param
done done
vtysh "$@" vtysh "$@"