diff --git a/etc/net/scripts/openvpn.action b/etc/net/scripts/openvpn.action index e024f10..4829548 100755 --- a/etc/net/scripts/openvpn.action +++ b/etc/net/scripts/openvpn.action @@ -8,12 +8,15 @@ # cmd tun_dev tun_mtu link_mtu ifconfig_local_ip ifconfig_remote_ip [ init | restart ] # For --dev tap execute as: # cmd tap_dev tap_mtu link_mtu ifconfig_local_ip ifconfig_netmask [ init | restart ] +# For --dev-type tap with server configured without "pull" execute as: +# cmd tap_dev tap_mtu link_mtu [ init | restart ] -if [ $# -lt 6 ] ; then + +if [ $# -ne 6 ] && [ $# -ne 4 ] ; then logger -d "Wrong arguments to $0: '$@'" exit 1 fi -[ "$6" = "init" ] && exec /etc/net/scripts/ifup-openvpn $1 +[ "$6" = "init" ] || [ "$4" = "init" ] && exec /etc/net/scripts/ifup-openvpn $1 exit 0