Package: dnsmasq
Version: 2.78-1

Using dnsmasq 2.78-1 (backported to Jessie) and dns-root-data 2017072601~deb8u1
I get

        # /etc/init.d/dnsmasq stop
        sed: -e expression #1, char 103: Invalid range end
        [ ok ] Stopping DNS forwarder and DHCP server: dnsmasq.

I would suggest to fix the sed statement in the init script.
Instead of "[.a-ZA-Z0-9]" it should use

        env LC_ALL=C sed ... [.a-zA-Z0-9]

to fix the sed expression and to avoid side effects of weird
locales. See attachment.


Hope this helps
Harri
--- debian/init.bak	2017-12-14 11:03:55.000000000 +0100
+++ debian/init	2017-12-14 11:16:44.219443611 +0100
@@ -111,7 +111,7 @@
 ROOT_DS="/usr/share/dns/root.ds"
 
 if [ -f $ROOT_DS ]; then
-    DNSMASQ_OPTS="$DNSMASQ_OPTS `sed -rne "s/^([.a-ZA-Z0-9]+)([[:space:]]+[0-9]+)*([[:space:]]+IN)*[[:space:]]+DS[[:space:]]+/--trust-anchor=\1,/;s/[[:space:]]+/,/gp" $ROOT_DS | tr '\n' ' '`"
+    DNSMASQ_OPTS="$DNSMASQ_OPTS `env LC_ALL=C sed -rne "s/^([.a-zA-Z0-9]+)([[:space:]]+[0-9]+)*([[:space:]]+IN)*[[:space:]]+DS[[:space:]]+/--trust-anchor=\1,/;s/[[:space:]]+/,/gp" $ROOT_DS | tr '\n' ' '`"
 fi
 
 start()

Reply via email to