aboutsummaryrefslogtreecommitdiff
path: root/stand/lua/config.lua
diff options
context:
space:
mode:
Diffstat (limited to 'stand/lua/config.lua')
-rw-r--r--stand/lua/config.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/stand/lua/config.lua b/stand/lua/config.lua
index 1934fe795f06..6a898ce8cfb5 100644
--- a/stand/lua/config.lua
+++ b/stand/lua/config.lua
@@ -389,16 +389,24 @@ end
local function checkNextboot()
local nextboot_file = loader.getenv("nextboot_conf")
+ local nextboot_enable = loader.getenv("nextboot_enable")
+
if nextboot_file == nil then
return
end
+ -- is nextboot_enable set in nvstore?
+ if nextboot_enable == "NO" then
+ return
+ end
+
local text = readFile(nextboot_file, true)
if text == nil then
return
end
- if text:match("^nextboot_enable=\"NO\"") ~= nil then
+ if nextboot_enable == nil and
+ text:match("^nextboot_enable=\"NO\"") ~= nil then
-- We're done; nextboot is not enabled
return
end
@@ -421,6 +429,7 @@ local function checkNextboot()
io.write(nfile, "nextboot_enable=\"NO\" ")
io.close(nfile)
end
+ loader.setenv("nextboot_enable", "NO")
end
-- Module exports