aboutsummaryrefslogtreecommitdiff
path: root/net/openvpn/files/etc/hotplug.d
Commit message (Collapse)AuthorAge
* Openvpn: add missing script event optionsErik Conijn2024-01-02
| | | | | | | | | | | | | | | | | | | | Maintainer: @mkrkn @neheb Compile tested: aarch64, cortex-a53, OpenWRT Master Run tested: Dynalink DL-WRX36 Description: [A previous commit](https://github.com/openwrt/packages/commit/f8a8b71e26b9bdbf86fbb7d4d1482637af7f3ba4) has added more script event options. However it looked like that commit was not complete as it stops the use of the script events route-up, route-pre-down, and ipchange when those are placed in the openvpn config file. This PR fixes a regression that makes it problematic to specify certain event options in the OpenVPN configuration file. Discussion in [this thread](https://forum.openwrt.org/t/openvpn-custom-route-up-script-in-23-05-rc2/167105/13) and [here](https://forum.openwrt.org/t/openvpn-route-up-and-route-pre-down-broken-in-23-05/176568) Please have a look and consider implementing or make it possible to use all script event options in the openvpn config file in another way. Pull request has been discussed and improved with the help of @AuthorReflex, see: https://github.com/openwrt/packages/pull/21732 Signed-off-by: Erik Conijn <egc112@msn.com>
* openvpn: fix invoking user up & down commands from hotplug wrapperJo-Philipp Wich2021-04-01
| | | | | | | | | | | | | | | | | | | | | | | | This commit adds a number of fixes to the OpenVPN up/down hotplug command wrapper which currently fails to actually invoke user defined up and down commands for uci configurations not using external native configurations. - Use the `--setenv` to pass the user configured `up` and `down` commands as `user_up` and `user_down` environment variables respectively - Instead of attempting to scrape the `up` and `down` settings from the (possibly generated) native OpenVPN configuration in `/etc/hotplug.d/openvpn/01-user`, read them from the respective environment variables instead - Fix parsing of native configuration values in `get_openvpn_option()`; first try to parse a given setting as single quoted value, then as double quoted and finally as non-quoted, potentially white-space escaped one. This ensures that `up '/bin/foo'` is interpreted as `/bin/foo` and not `'/bin/foo'` Ref: https://forum.openwrt.org/t/openvpn-up-down-configuration-ignored/91126 Supersedes: #15121, #15284 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* openvpn: import from baseRosen Penev2020-12-01
Signed-off-by: Rosen Penev <rosenp@gmail.com>