diff options
-rw-r--r-- | interfaces-model.lua | 5 | ||||
-rw-r--r-- | interfaces-status-html.lsp | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/interfaces-model.lua b/interfaces-model.lua index 66132b3..04a1d6c 100644 --- a/interfaces-model.lua +++ b/interfaces-model.lua @@ -381,6 +381,7 @@ get_status = function () status.filename = cfe({ value=filename, label="Interfaces file" }) status.iproute = cfe({ type="longtext", label="ip route" }) status.ipaddr = cfe({ type="longtext", label="ip addr" }) + status.iptunnel = cfe({ type="longtext", label="ip tunnel" }) if not fs.is_file(filename) then status.filename.errtxt = "File not found" @@ -393,6 +394,10 @@ get_status = function () f = io.popen(format.escapespecialcharacters(cmd)) status.ipaddr.value = f:read("*a") f:close() + cmd = path.."ip tunnel" + f = io.popen(format.escapespecialcharacters(cmd)) + status.iptunnel.value = f:read("*a") + f:close() return cfe({ type="group", value=status, label="Status" }) end diff --git a/interfaces-status-html.lsp b/interfaces-status-html.lsp index 0dc8581..dfca7b1 100644 --- a/interfaces-status-html.lsp +++ b/interfaces-status-html.lsp @@ -7,5 +7,8 @@ displayitem(view.value.filename) displayitem(view.value.ipaddr) displayitem(view.value.iproute) +if view.value.iptunnel.value ~= "" then + displayitem(view.value.iptunnel) +end %> </DL> |