mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-04 23:33:56 +08:00
update 2026-10-24 00:18:10
This commit is contained in:
1 parent
0dc3af034c
commit
015941ec68
78 files changed
+23
-21821
No files matched your search
@@ -63,15 +63,8 @@ function stretch()
|
||||
if not _flag and dnsmasq_noresolv == "1" then
|
||||
api.uci_del("dhcp", "@dnsmasq[0]", "noresolv")
|
||||
local RESOLVFILE = "/tmp/resolv.conf.d/resolv.conf.auto"
|
||||
local file = io.open(RESOLVFILE, "r")
|
||||
if not file then
|
||||
if (fs.stat(RESOLVFILE, "size") or 0) == 0 then
|
||||
RESOLVFILE = "/tmp/resolv.conf.auto"
|
||||
else
|
||||
local size = file:seek("end")
|
||||
file:close()
|
||||
if size == 0 then
|
||||
RESOLVFILE = "/tmp/resolv.conf.auto"
|
||||
end
|
||||
end
|
||||
api.uci_set("dhcp", "@dnsmasq[0]", "resolvfile", RESOLVFILE)
|
||||
api.uci_save(nil, "dhcp", true)
|
||||
|
||||
Reference in new issue
Block a user