Commit 1980ec6b authored by Jondy Zhao's avatar Jondy Zhao

Add object 'vpntap used to add openvpn tap-windows driver;

Do nothing for object 'tuntap';
parent f3647964
...@@ -507,7 +507,7 @@ while [[ "$1" != "" ]] && [[ "$object" == "" ]] ; do ...@@ -507,7 +507,7 @@ while [[ "$1" != "" ]] && [[ "$object" == "" ]] ; do
let opt_statistics+=1 let opt_statistics+=1
;; ;;
link | addr | addrlabel | route | rule | neigh | tunnel | \ link | addr | addrlabel | route | rule | neigh | tunnel | \
maddr | mroute | monitor | tuntap) maddr | mroute | monitor | tuntap | vpntap)
object=$1 object=$1
;; ;;
*) echo Warning: unsupport options "$1" *) echo Warning: unsupport options "$1"
...@@ -748,6 +748,10 @@ elif [[ $object == "route" ]] ; then ...@@ -748,6 +748,10 @@ elif [[ $object == "route" ]] ; then
fi fi
elif [[ $object == "tuntap" ]] ; then elif [[ $object == "tuntap" ]] ; then
echo $orig_cmd
exit 0
elif [[ $object == "vpntap" ]] ; then
while [[ "$1" != "" ]] ; do while [[ "$1" != "" ]] ; do
case $1 in case $1 in
...@@ -769,8 +773,13 @@ elif [[ $object == "tuntap" ]] ; then ...@@ -769,8 +773,13 @@ elif [[ $object == "tuntap" ]] ; then
install_tap_driver "$dev" install_tap_driver "$dev"
exit $? exit $?
elif [[ "$command" == "del" ]] ; then elif [[ "$command" == "del" ]] ; then
uninstall_tap_driver "$dev" if [[ "$mode" == "" ]] ; then
exit $? echo $orig_cmd
exit 0
else
uninstall_tap_driver "$dev"
exit $?
fi
else else
echo $orig_cmd echo $orig_cmd
echo "Error: unsupported command \"$command\" for tuntap" echo "Error: unsupported command \"$command\" for tuntap"
......
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