[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fix for dnsmasq breakage



The recent update to the dns-root-data package in jessie changed its format which in causes dnsmasq to not be able to start up, which causes DNS servers running dnsmasq to not work.

See debian bug # 858506 for more information for when this happened on stretch.

The attached patch is taken from there and fixes the issue.

Nick Hall

--- etc/init.d/dnsmasq.orig	2018-07-02 07:09:55.553073068 -0500
+++ etc/init.d/dnsmasq	2018-07-02 07:10:36.385072508 -0500
@@ -111,7 +111,7 @@
 ROOT_DS="/usr/share/dns/root.ds"
 
 if [ -f $ROOT_DS ]; then
-   DNSMASQ_OPTS="$DNSMASQ_OPTS `sed -e s/". IN DS "/--trust-anchor=.,/ -e s/" "/,/g $ROOT_DS | tr '\n' ' '`" 
+   DNSMASQ_OPTS="$DNSMASQ_OPTS $(cat $ROOT_DS | tr '[:blank:]' '\t' | cut -f4- | sed 's#^[A-Z]\+\s\+## ; s#^#--trust-anchor=.,# ; s:[ \t]\+:,:g' | paste -s -d ' ')"
 fi
 
 start()

Reply to: