openvpn: fix startup with script-security lower than 2
authorClemens Hopfer <openwrt@wireloss.net>
Tue, 2 Jul 2024 20:49:02 +0000 (22:49 +0200)
committerRosen Penev <rosenp@gmail.com>
Wed, 3 Jul 2024 19:55:24 +0000 (12:55 -0700)
commit1cf592503b42956a422804d8b84ab25ea7e16d10
treeee7a635249902f3f5f43c76bf5b9a0dd80b42dde
parent24f1c9b49005225390188d11e2070776f90c7f92
openvpn: fix startup with script-security lower than 2

External scripts may only be specified with script-security 2 or higher,
otherwise OpenVPN fails at tunnel startup with an error.
This changes the previously hardcoded hotplug scripts to only be added if
script-security is 2 or higher is used.

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
net/openvpn/Makefile
net/openvpn/files/openvpn.init