Commit ec1112b8 authored by Jondy Zhao's avatar Jondy Zhao

Tell address family by address in ip script.

parent 75a4a33d
...@@ -543,6 +543,13 @@ elif [[ $object == "addr" ]] ; then ...@@ -543,6 +543,13 @@ elif [[ $object == "addr" ]] ; then
if [[ $command == "add" ]] || [[ $command == "del" ]] ; then if [[ $command == "add" ]] || [[ $command == "del" ]] ; then
mask=$(prefix_to_netmask $(basename $1)) mask=$(prefix_to_netmask $(basename $1))
address=$(dirname $1) address=$(dirname $1)
if [[ "$opt_family" == "" ]] ; then
if [[ "$address" == *:* ]] ; then
opt_family="ipv6"
else
opt_family="ipv4"
fi
fi
shift shift
elif [[ $command == "list" ]] ; then elif [[ $command == "list" ]] ; then
command="show" command="show"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment