diff --git a/utils/upgrade/upgrade-4-to-5.lua.in b/utils/upgrade/upgrade-4-to-5.lua.in index 212e0e10c99d1f1f3431784f3585573879ef946c..6ddc5b75f61cb6eb6fdbf7110ebb8ecc2fe5e5ca 100644 --- a/utils/upgrade/upgrade-4-to-5.lua.in +++ b/utils/upgrade/upgrade-4-to-5.lua.in @@ -9,17 +9,17 @@ local sockets = { -- globals addr_port = {} -outfile = io.open(out, 'a') +outfile = io.open(out, 'w') if outfile == nil then - -- this is technicaly an error, but upgrade script should fail in scriptlets + -- this is technicaly an error, but upgrade script shouldn't fail in scriptlets os.exit(0) -- make no changes and exit end outfile:write("-- Suggested network interface configuration\n") -outfile:write("-- Please verify these settings match your desired configuration\n") -outfile:write("-- and add them to @etc_dir@/kresd.conf\n") outfile:write("-- See https://knot-resolver.readthedocs.io/en/stable/upgrading.html\n\n") +outfile:write("-- Please remove any unused or undesired interfaces and add them to\n") +outfile:write("-- @etc_dir@/kresd.conf\n\n") local function write_net_listen(addr, port, kind) -- make sure (addr, port) combination is unique