openvpn: use common pattern for global variable

The common pattern for global variable is, to write the variable name in
capital letters. This improves maintainability in shell scripts.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2026-03-05 09:19:15 +01:00
committed by Florian Eckert
parent 9ccb8650fd
commit f89b656de2

View File

@@ -37,7 +37,7 @@ option_builder() {
list) proto_config_add_array "$f:list" ;;
esac
elif [ "$action" = "build" ]; then
[ "${f#*:}" = "d" ] && [ "$allow_deprecated" = 0 ] && continue
[ "${f#*:}" = "d" ] && [ "$ALLOW_DEPRECATED" = 0 ] && continue
case "$opt_type" in
bool)
json_get_var v "$f"
@@ -97,12 +97,13 @@ proto_openvpn_init_config() {
proto_openvpn_setup() {
local config="$1"
local allow_deprecated exec_params
allow_deprecated=0
local exec_params
exec_params=
json_get_var allow_deprecated allow_deprecated
# alllow deprecated OpenVPN configuration values by default
json_get_var ALLOW_DEPRECATED allow_deprecated
[ -z "$ALLOW_DEPRECATED" ] && ALLOW_DEPRECATED=0
# Build exec params from configured options we get from ubus values stored during init_config
option_builder build OPENVPN_BOOLS bool