summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-01-27 20:09:40 +0000
committerTed Trask <ttrask01@yahoo.com>2012-01-27 20:09:40 +0000
commitf84b4f11ce56eb5d8e97eda4f21e353f83258b64 (patch)
treec33a3016c9258cca330f23681d6001ee1f883496
parent94ec990624b319a682ea872363b87b2f059ac66f (diff)
downloadacf-provisioning-f84b4f11ce56eb5d8e97eda4f21e353f83258b64.tar.bz2
acf-provisioning-f84b4f11ce56eb5d8e97eda4f21e353f83258b64.tar.xz
Changed require statements to reflect location of libraries in acf-lib-0.3 and acf-core-0.14
-rwxr-xr-xcgi-bin/provisioning.cgi10
-rwxr-xr-xconfig/notify_device2
-rw-r--r--provisioning-model.lua6
3 files changed, 6 insertions, 12 deletions
diff --git a/cgi-bin/provisioning.cgi b/cgi-bin/provisioning.cgi
index 5ac1684..e4c9303 100755
--- a/cgi-bin/provisioning.cgi
+++ b/cgi-bin/provisioning.cgi
@@ -117,10 +117,7 @@ if ( request_method == "GET" ) then
log:write("Checking PROV Table for results\n")
-- Load the ACF mvc
- local PATH = package.path
- package.path = "/usr/share/acf/www/cgi-bin/?.lua;" .. package.path
- require("mvc")
- package.path = PATH
+ mvc = require("acf.mvc")
-- We'll use the cli controller, but change the view resolver to call the template
local pathinfo = ENV.PATH_INFO
FRAMEWORK=mvc:new()
@@ -163,10 +160,7 @@ elseif ( request_method == "PUT" ) then
if not string.match(path_info, "%.log$") then
log:write("Checking PROV Table for results\n")
-- Load the ACF mvc
- local PATH = package.path
- package.path = "/usr/share/acf/www/cgi-bin/?.lua;" .. package.path
- require("mvc")
- package.path = PATH
+ mvc = require("acf.mvc")
-- We'll use the cli controller, but change the view resolver to report HTTP code
local pathinfo = ENV.PATH_INFO
FRAMEWORK=mvc:new()
diff --git a/config/notify_device b/config/notify_device
index 7d5ff2a..aecf85a 100755
--- a/config/notify_device
+++ b/config/notify_device
@@ -1,6 +1,6 @@
#!/usr/bin/lua
require("socket")
-require("validator")
+validator = require("acf.validator")
if not arg or #arg == 0 then
print("Error - IP Address must be specified")
diff --git a/provisioning-model.lua b/provisioning-model.lua
index 3ea8a3b..297d44e 100644
--- a/provisioning-model.lua
+++ b/provisioning-model.lua
@@ -3,9 +3,9 @@ module (..., package.seeall)
-- Load libraries
require("modelfunctions")
require("posix")
-require("fs")
-require("format")
-require("validator")
+fs = require("acf.fs")
+format = require("acf.format")
+validator = require("acf.validator")
require("luasql.postgres")
require("session")