Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152459124
D53238.id164689.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D53238.id164689.diff
View Options
diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -69,7 +69,7 @@
end
local function chmod(path, mode)
- local mode = tonumber(mode, 8)
+ mode = tonumber(mode, 8)
local _, err, msg = sys_stat.chmod(path, mode)
if err then
errmsg("chmod(" .. path .. ", " .. mode .. ") failed: " .. msg)
@@ -150,8 +150,6 @@
end
local function getgroups()
- local ret = {}
-
local root = os.getenv("NUAGE_FAKE_ROOTDIR")
local cmd = "pw "
if root then
@@ -579,7 +577,7 @@
root = "/"
end
- f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone)
+ local f, _, rc = os.execute("tzsetup -s -C " .. root .. " " .. timezone)
if not f then
warnmsg("Impossible to configure time zone ( rc = " .. rc .. " )")
diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit
--- a/libexec/nuageinit/nuageinit
+++ b/libexec/nuageinit/nuageinit
@@ -229,10 +229,10 @@
local resolv_conf = root .. "/etc/resolv.conf"
- resolv_conf_attr = lfs.attributes(resolv_conf)
+ local resolv_conf_attr = lfs.attributes(resolv_conf)
if resolv_conf_attr == nil then
- resolv_conf_handler = open_resolv_conf()
+ local resolv_conf_handler = open_resolv_conf()
resolv_conf_handler:close()
end
@@ -295,10 +295,11 @@
-- with the matching interfaces must be returned. This changes the way we initially
-- thought about our implementation, since at first we only needed one interface,
-- but cloud-init performs actions on a group of matching interfaces.
+ local interface
local interfaces = {}
if rules.macaddress then
local ifaces = get_ifaces_by_mac()
- local interface = ifaces[rules.macaddress]
+ interface = ifaces[rules.macaddress]
if not interface then
nuage.warn("not interface matching by MAC address: " .. rules.macaddress)
return
@@ -381,6 +382,7 @@
extra_opts = extra_opts .. " wol"
end
if v.mtu then
+ local mtu
if type(v.mtu) == "number" then
mtu = tostring(v.mtu)
else
@@ -704,7 +706,7 @@
for i = 1, #calls_table do
if citype == "nocloud" and calls_table[i] == network_config then
- netobj = parse_network_config()
+ local netobj = parse_network_config()
if netobj == nil then
network_config(obj)
else
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 2:27 AM (1 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31571769
Default Alt Text
D53238.id164689.diff (2 KB)
Attached To
Mode
D53238: nuageinit: Silence luacheck warnings and fix typos
Attached
Detach File
Event Timeline
Log In to Comment