From 3e0492fee9b14dd17da1b162a8caed26b2679186 Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Wed, 26 Apr 2017 21:54:57 +0200 Subject: luci-app-ddns: fix to correct system status preset network "wan", if not configured in ddns config to correct display system status #1117 Signed-off-by: Christian Schoenebeck --- applications/luci-app-ddns/Makefile | 4 ++-- applications/luci-app-ddns/luasrc/controller/ddns.lua | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/applications/luci-app-ddns/Makefile b/applications/luci-app-ddns/Makefile index 88c905a41..69f9880d4 100644 --- a/applications/luci-app-ddns/Makefile +++ b/applications/luci-app-ddns/Makefile @@ -2,7 +2,7 @@ # Copyright 2008 Steven Barth # Copyright 2008 Jo-Philipp Wich # Copyright 2013 Manuel Munz -# Copyright 2014-2016 Christian Schoenebeck +# Copyright 2014-2017 Christian Schoenebeck # # This is free software, licensed under the Apache License, Version 2.0 @@ -16,7 +16,7 @@ PKG_VERSION:=2.4.8 # Release == build # increase on changes of translation files -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 PKG_MAINTAINER:=Christian Schoenebeck diff --git a/applications/luci-app-ddns/luasrc/controller/ddns.lua b/applications/luci-app-ddns/luasrc/controller/ddns.lua index 63bb8bf4b..1dfa62554 100755 --- a/applications/luci-app-ddns/luasrc/controller/ddns.lua +++ b/applications/luci-app-ddns/luasrc/controller/ddns.lua @@ -1,7 +1,7 @@ -- Copyright 2008 Steven Barth -- Copyright 2008 Jo-Philipp Wich -- Copyright 2013 Manuel Munz --- Copyright 2014-2016 Christian Schoenebeck +-- Copyright 2014-2017 Christian Schoenebeck -- Licensed to the public under the Apache License 2.0. module("luci.controller.ddns", package.seeall) @@ -24,7 +24,7 @@ local srv_ver_min = "2.7.6" -- minimum version of service required local srv_ver_cmd = luci_helper .. [[ -V | awk {'print $2'}]] local app_name = "luci-app-ddns" local app_title = "Dynamic DNS" -local app_version = "2.4.8-1" +local app_version = "2.4.8-2" function index() local nxfs = require "nixio.fs" -- global definitions not available @@ -180,12 +180,10 @@ local function _get_status() end -- get/set monitored interface and IP version - local iface = s["interface"] or "_nonet_" + local iface = s["interface"] or "wan" local use_ipv6 = tonumber(s["use_ipv6"]) or 0 - if iface ~= "_nonet_" then - local ipv = (use_ipv6 == 1) and "IPv6" or "IPv4" - iface = ipv .. " / " .. iface - end + local ipv = (use_ipv6 == 1) and "IPv6" or "IPv4" + iface = ipv .. " / " .. iface -- try to get registered IP local lookup_host = s["lookup_host"] or "_nolookup_" -- cgit v1.2.3