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
# The sub commands must start with "show"
LAST_PARA=
for para in "$@"
LAST_PARAM=
for param in "$@"
do
if [ "$LAST_PARA" == "-c" ] && [[ "$para" != show* ]]; then
echo "Not allow to run the command '$para', please use the comand 'sudo vtysh' instead." 1>&2
if [ "$LAST_PARAM" == "-c" ] && [[ "$param" != show* ]]; then
echo "Not allow to run the command '$param', please use the comand 'sudo vtysh' instead." 1>&2
exit 1
fi
LAST_PARA=$para
LAST_PARAM=$param
done
vtysh "$@"