From 0537a242f9709271454252e7897a7709144a3b02 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 9 Oct 2013 20:19:18 +0000 Subject: Change use of require to work with Lua 5.2 --- alpineversion-model.lua | 2 +- cron-listjobs-html.lsp | 2 +- cron-model.lua | 4 ++-- health-model.lua | 2 +- health-networkstats-html.lsp | 2 +- hostname-model.lua | 2 +- hostname-read-html.lsp | 2 +- interfaces-model.lua | 2 +- interfaces-read-html.lsp | 2 +- interfaces-status-html.lsp | 2 +- interfaces-update-html.lsp | 4 ++-- logfiles-controller.lua | 2 +- logfiles-model.lua | 4 ++-- logfiles-status-html.lsp | 2 +- logfiles-tail-html.lsp | 2 +- logfiles-view-html.lsp | 2 +- modules-edit-html.lsp | 2 +- modules-model.lua | 2 +- password-model.lua | 6 +++--- rc-model.lua | 4 ++-- rc-status-html.lsp | 2 +- syslog-config-html.lsp | 2 +- syslog-loginfo-html.lsp | 2 +- syslog-model.lua | 2 +- 24 files changed, 30 insertions(+), 30 deletions(-) diff --git a/alpineversion-model.lua b/alpineversion-model.lua index ac20bb8..b839785 100644 --- a/alpineversion-model.lua +++ b/alpineversion-model.lua @@ -1,7 +1,7 @@ -- alpineversion model methods module (..., package.seeall) -fs = fs = require("acf.fs") +fs = require("acf.fs") get = function () local liboutput = fs.read_file("/etc/alpine-release") diff --git a/cron-listjobs-html.lsp b/cron-listjobs-html.lsp index d748d61..fc18ee3 100644 --- a/cron-listjobs-html.lsp +++ b/cron-listjobs-html.lsp @@ -1,5 +1,5 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"editjob", "deletejob", "movejob"}, session) %> diff --git a/cron-model.lua b/cron-model.lua index f6fcc40..46081ac 100644 --- a/cron-model.lua +++ b/cron-model.lua @@ -1,7 +1,7 @@ module (..., package.seeall) -require("posix") -require("modelfunctions") +posix = require("posix") +modelfunctions = require("modelfunctions") format = require("acf.format") fs = require("acf.fs") validator = require("acf.validator") diff --git a/health-model.lua b/health-model.lua index 8007ff0..50c61f2 100644 --- a/health-model.lua +++ b/health-model.lua @@ -4,7 +4,7 @@ module (..., package.seeall) fs = require("acf.fs") date = require("acf.date") format = require("acf.format") -require("modelfunctions") +modelfunctions = require("modelfunctions") -- ############################################################### -- Private functions diff --git a/health-networkstats-html.lsp b/health-networkstats-html.lsp index c068503..fcc2476 100644 --- a/health-networkstats-html.lsp +++ b/health-networkstats-html.lsp @@ -1,5 +1,5 @@ <% local view, viewlibrary, page_info = ... %> -<% require("json") %> +<% json = require("json") %> <% html = require("acf.html") %> <% -- Table of colors diff --git a/hostname-model.lua b/hostname-model.lua index 11aacae..3094393 100644 --- a/hostname-model.lua +++ b/hostname-model.lua @@ -2,7 +2,7 @@ module (..., package.seeall) fs = require("acf.fs") -require("modelfunctions") +modelfunctions = require("modelfunctions") get = function (fqdn) local n diff --git a/hostname-read-html.lsp b/hostname-read-html.lsp index 604d9b0..d1419fc 100644 --- a/hostname-read-html.lsp +++ b/hostname-read-html.lsp @@ -1,5 +1,5 @@ <% local view = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %>

<%= html.html_escape(view.label) %>

diff --git a/interfaces-model.lua b/interfaces-model.lua index ab1ec68..2f108b9 100644 --- a/interfaces-model.lua +++ b/interfaces-model.lua @@ -2,7 +2,7 @@ -- Copyright(c) 2007 N. Angelacos - Licensed under terms of GPL2 module (..., package.seeall) -require("modelfunctions") +modelfunctions = require("modelfunctions") fs = require("acf.fs") format = require("acf.format") diff --git a/interfaces-read-html.lsp b/interfaces-read-html.lsp index a3f174b..b736209 100644 --- a/interfaces-read-html.lsp +++ b/interfaces-read-html.lsp @@ -1,5 +1,5 @@ <% local view, viewlibrary, page_info, session = ... -require("htmlviewfunctions") +htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> diff --git a/interfaces-status-html.lsp b/interfaces-status-html.lsp index c20b798..dd01099 100644 --- a/interfaces-status-html.lsp +++ b/interfaces-status-html.lsp @@ -1,5 +1,5 @@ <% local view = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %>

SYSTEM INFO

diff --git a/interfaces-update-html.lsp b/interfaces-update-html.lsp index 23ef31d..1d1ee14 100644 --- a/interfaces-update-html.lsp +++ b/interfaces-update-html.lsp @@ -1,7 +1,7 @@ <% local form, viewlibrary, page_info = ... -require("htmlviewfunctions") +htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") -require("json") +json = require("json") -- iface is a local table with cfes for the various parts of interface definitions -- Depending on the address family and corresponding method, different options are valid diff --git a/logfiles-controller.lua b/logfiles-controller.lua index dcaa12d..3c594f2 100644 --- a/logfiles-controller.lua +++ b/logfiles-controller.lua @@ -1,5 +1,5 @@ module (..., package.seeall) -require("posix") +posix = require("posix") default_action = "status" diff --git a/logfiles-model.lua b/logfiles-model.lua index 0c26f22..a43de6c 100644 --- a/logfiles-model.lua +++ b/logfiles-model.lua @@ -1,8 +1,8 @@ -- acf model for displaying logfiles module (..., package.seeall) -require("posix") -require("modelfunctions") +posix = require("posix") +modelfunctions = require("modelfunctions") fs = require("acf.fs") format = require("acf.format") diff --git a/logfiles-status-html.lsp b/logfiles-status-html.lsp index db1122c..62b28eb 100644 --- a/logfiles-status-html.lsp +++ b/logfiles-status-html.lsp @@ -1,5 +1,5 @@ <% local view, viewlibrary, page_info, session = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %> <% htmlviewfunctions.displaycommandresults({"delete"}, session) %> diff --git a/logfiles-tail-html.lsp b/logfiles-tail-html.lsp index 40a81a7..24366a7 100644 --- a/logfiles-tail-html.lsp +++ b/logfiles-tail-html.lsp @@ -1,5 +1,5 @@ <% local form, viewlibrary, page_info = ... %> -<% require("htmlviewfunctions") %> +<% htmlviewfunctions = require("htmlviewfunctions") %> <% html = require("acf.html") %>