dnsmasq: write atomic host file
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 7 Dec 2017 09:11:50 +0000 (10:11 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 7 Dec 2017 09:59:03 +0000 (10:59 +0100)
commita39ddff4287e760f44a2d7bb44be364a0061d4bf
treebe9b9eec7844889cb303ecce618c28cbe23994ec
parent94fcd929137d9e01ea64f3d69cb5f5e863b87fbc
dnsmasq: write atomic host file

Different invocations of the dnsmasq init script (e.g. at startup by procd)
will rewrite the dhcp host file which might result into dnsmasq reading an
empty dhcp host file as it is being rewritten by the dnsmasq init script.
Let the dnsmasq init script first write to a temp dhcp host file so it does
not overwrite the contents of the existing dhcp host file.

Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init