Conversation
| --syslog "openvpn_$config" \ | ||
| --tmp-dir "/var/run" \ | ||
| $exec_params | ||
| eval "proto_run_command '$config' openvpn $exec_params" |
There was a problem hiding this comment.
we don't eval in protos.
There was a problem hiding this comment.
If I don't do it this way, it doesn't work. I suspect it's because of the append command.
I found in the repo others that do the same thing for the same reason.
There was a problem hiding this comment.
What doesn't work? Testing showed it worked fine. What is the error? Eval means that proto is in control of a subshell, and not the openvpn process. Not sure of behaviour in that case.
There was a problem hiding this comment.
I have noticed that if I don't do this and the default hotplug handling is active, the service is in a restart loop. As I understand it, a new option is added via append for each whitespace.
The argument does have a two whitspaces one between the option and the argument and one in the argument itself --ipchange '/usr/libexec/openvpn-hotplug ipchange'
The call via eval prevents this.
@systemcrash Please try it yourself.
|
Good work :) |
|
You guys have been busy 👍 I compiled this morning but with all the changes I will try again tomorrow. No luck though with the use of the config file that is not working yet but I am sure you can solve it the coming days Thank you both for all your work |
Handled in the UI already - might take another day to get built tho. |
d2f6e39 to
84bb35e
Compare
Since proto was migrated to ovpnproto to avoid collision with netifd proto, this shall be handled separately. Also avoid using uci commands to migrate the config which requires knowing property types; use awk instead. follow-up to 2607b76 Signed-off-by: Paul Donald <newtwen+github@gmail.com>
There is always only one blank line between the sections. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This was forgotten during renameing of this option. Fixes: e026ce0 ("openvpn: handle ovpnproto exclusively") Signed-off-by: Florian Eckert <fe@dev.tdt.de>
The variable 'auth_file' is not used in the following programme sequence. It therefore only makes sense to add it as a call parameter via 'append' when calling the the 'proto_run_commmand'. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
The common pattern for global variable is, to write the variable name capital letters. This improves maintainability in shell scripts. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
There is already the 'append' command, which assembles all parameters that are called 'proto_run_command'. Let´s use that. To ensure that the sequence is correct, the parameters must be added at the beginning, so that user parameters can overwrite them. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
There is already the 'append' command, which assembles all parameters that are called 'proto_run_command'. Let´s move also the last params to the top. To ensure that the sequence is correct, the parameters must be added at the beginning, so that user parameters can overwrite them. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Properly quote arguments when assembling the command line and eval the proto_run_command() invocation in order to prevent the shell from improperly splitting the command arguments on '$IFS'. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit adds hotplug handling back in. Fixes: 2607b76 ("openvpn: introduce proto handler") Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Increment PKG_RELEASE by one. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
84bb35e to
72c5156
Compare
|
@systemcrash |
📦 Package Details
Maintainer: ?
Description:
Add back hotplug handling @systemcrash
I only have one setup where I could test this. But from my point of view, it should now behave exactly as it did before the proto change. What is still missing here is the implementation for the ucode proto. I haven't done that yet. But I would look into it in a follow-up PR.
🧪 Run Testing Details
✅ Formalities