]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
utils/upgrade: minor changes to upgrade script
authorTomas Krizek <tomas.krizek@nic.cz>
Tue, 21 Jan 2020 14:22:15 +0000 (15:22 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Fri, 24 Jan 2020 12:19:06 +0000 (13:19 +0100)
utils/upgrade/upgrade-4-to-5.lua.in

index 212e0e10c99d1f1f3431784f3585573879ef946c..6ddc5b75f61cb6eb6fdbf7110ebb8ecc2fe5e5ca 100644 (file)
@@ -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