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:
parent
a9f6413eb5
commit
9387350e19
@ -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 "$@"
|
||||||
|
Reference in New Issue
Block a user