diff --git a/src/network/netconfig.lua b/src/network/netconfig.lua index a8778f6..21473c4 100644 --- a/src/network/netconfig.lua +++ b/src/network/netconfig.lua @@ -1,4 +1,4 @@ -local u = require("util") +local u = require("util.utils") local l = require("logger") local uci = require("uci").cursor() diff --git a/src/network/wlanconfig.lua b/src/network/wlanconfig.lua index da72e73..92380a1 100644 --- a/src/network/wlanconfig.lua +++ b/src/network/wlanconfig.lua @@ -1,5 +1,5 @@ local reconf = require("network.netconfig") -local util = require("util") +local util = require("util.utils") local l = require("logger") local uci = require("uci").cursor() local iwinfo = require("iwinfo") diff --git a/src/util.lua b/src/util/utils.lua similarity index 54% rename from src/util.lua rename to src/util/utils.lua index eedd891..fe6adb3 100644 --- a/src/util.lua +++ b/src/util/utils.lua @@ -2,26 +2,6 @@ local uci = require("uci").cursor() local M = {} -function M.printWithSuccess(msg) - if msg ~= nil and msg ~= "" then print("OK," .. msg) - else print("OK") end -end -function M.exitWithSuccess(msg) - if msg ~= nil and msg ~= "" then print("OK," .. msg) - else print("OK") end - os.exit(0) -end -function M.exitWithWarning(msg) - if msg ~= nil and msg ~= "" then print("WARN," .. msg) - else print("OK") end - os.exit(0) -end -function M.exitWithError(msg) - if msg ~= nil and msg ~= "" then print("ERR," .. msg) - else print("OK") end - os.exit(1) -end - function M.getUciSectionName(config, type) local sname = nil uci:foreach(config, type, function(s) sname = s[".name"] end)