Opened 8 years ago
Closed 21 months ago
#826 closed Feature Wish (wontfix)
Suggestion: warn when --config is not the first parameter
Reported by: | i336_ | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Configuration | Version: | OpenVPN 2.3.6 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | config directive override warning |
Cc: |
Description
Just fixed a fun issue where my --dev setting wasn't "taking" and OpenVPN was still using tun0.
Eventually I figured out that I was doing
openvpn --ping-restart 0 --dev vpn1234 --dev-type tun --config vpn1234.config --management vpn1234.sock unix --nice 19 --ifconfig-noexec --route-noexec
instead of doing
openvpn --config vpn1234.config --ping-restart 0 --dev vpn1234 --dev-type tun --management vpn1234.sock unix --nice 19 --ifconfig-noexec --route-noexec
Suffice to say I now understand why my --ping-restart 0
wasn't working as well!
My suggestion is that, if --config
is not the first parameter, a small warning be displayed that notes that directives in the config file may override commandline arguments. I'm sure that in certain circumstances this will be the desired behavior (eg, a script using pre-baked arguments overriden by config files) but I argue that this is not likely to be what most users are looking for, and that those users looking for this behavior will have a reasonable understanding of OpenVPN's configuration and this particular idiosyncrasy.
I'm fine with the fact that things work the way they do; it only took me a little under an hour or so to figure this out as opposed to a whole day, so I'm not overly mad :P
Change History (2)
comment:1 Changed 8 years ago by
comment:2 Changed 21 months ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing this, as I agree with Selva - such a warning could be added (not totally trivial), of course, but it would fire in many legitimate cases, confusing users with needless warnings.
In many cases --log (and possibly --cd) should be the first parameter not --config (always the case with connections started by the GUI), so such a warning is often not appropriate. Also multiple --config options are supported, so is --config inside a config file, and all of them cannot be the first option.