diff options
author | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2014-11-15 22:06:18 +0100 |
---|---|---|
committer | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2014-11-15 22:06:18 +0100 |
commit | 157e8e52aef5ede350e17ce688f76fbaddea5dd2 (patch) | |
tree | a49bbf5b2b00ad48af72a1b03741f92c673c993f /applications/luci-ddns/luasrc/tools | |
parent | a226f199accb4a9adce10d3373fb832109e60876 (diff) |
luci-app-ddns: modified to support ddns-scripts 2.1.0-2
- moved /usr/lib/ddns/dynamic_dns_lucihelper.sh to ddns-scripts package
- fixed error message when validating proxy
- modified validating ip_script to allow the usage of parameters
- using ipkg/postinst AND ipkg/postinst-pkg as long as LuCI Makefiles did not
fullfil requirements of new OpenWrt default_postinst and default_postrm
reported in Issue #255
- cleanup whitespaces at line ends
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-ddns/luasrc/tools')
-rw-r--r-- | applications/luci-ddns/luasrc/tools/ddns.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/applications/luci-ddns/luasrc/tools/ddns.lua b/applications/luci-ddns/luasrc/tools/ddns.lua index 8d56c92a16..ad7b5e86f2 100644 --- a/applications/luci-ddns/luasrc/tools/ddns.lua +++ b/applications/luci-ddns/luasrc/tools/ddns.lua @@ -44,7 +44,7 @@ end -- check if IPv6 supported by OpenWrt function check_ipv6() - return NXFS.access("/proc/net/ipv6_route") + return NXFS.access("/proc/net/ipv6_route") and NXFS.access("/usr/sbin/ip6tables") end @@ -113,7 +113,7 @@ end -- read version information for given package if installed function ipkg_version(package) - if not package then + if not package then return nil end local info = OPKG.info(package) @@ -121,7 +121,7 @@ function ipkg_version(package) local version = "" local i = 0 for k, v in pairs(info) do - if v.Package == package and v.Status.installed then + if v.Package == package and v.Status.installed then version = v.Version i = i + 1 end @@ -182,7 +182,7 @@ function flag_parse(self, section) if (fvalue ~= cvalue) then self.section.changed = true end else self:remove(section) - self.section.changed = true + self.section.changed = true end end @@ -222,14 +222,14 @@ end function parse_url(url) --, default) -- initialize default parameters local parsed = {} --- for i,v in base.pairs(default or parsed) do +-- for i,v in base.pairs(default or parsed) do -- parsed[i] = v -- end -- remove whitespace -- url = string.gsub(url, "%s", "") -- get fragment - url = string.gsub(url, "#(.*)$", + url = string.gsub(url, "#(.*)$", function(f) parsed.fragment = f return "" @@ -262,7 +262,7 @@ function parse_url(url) --, default) parsed.path = url local authority = parsed.authority - if not authority then + if not authority then return parsed end authority = string.gsub(authority,"^([^@]*)@", |