From: Jo-Philipp Wich Date: Fri, 8 Nov 2019 15:03:09 +0000 (+0100) Subject: luci-app-openvpn: do not make "remote" option dependent on client mode X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6496ed88a6dfa15c0f34f3865a559e1c405cdc4f;p=oweals%2Fluci.git luci-app-openvpn: do not make "remote" option dependent on client mode Fixes: #3279 Signed-off-by: Jo-Philipp Wich --- diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua index 1971400b8..c310efc11 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua @@ -497,8 +497,7 @@ local knownParams = { { DynamicList, "remote", "1.2.3.4", - translate("Remote host name or ip address"), - { client="1" } }, + translate("Remote host name or ip address") }, { Flag, "remote_random", 0, @@ -863,7 +862,7 @@ for _, option in ipairs(params) do function o.remove(self, section) local cfg_val = AbstractValue.cfgvalue(self, section) local txt_val = luci.http.formvalue("cbid."..self.map.config.."."..section.."."..self.option..".textbox") - + if cfg_val and fs.access(cfg_val) and txt_val == "" then fs.unlink(cfg_val) end