-- <snip> --

> Conditions we want to track:
> * installation state of deb 'dnsmasq', better yet:
>   deb 'dnsmasq'               = removed (not purged)
>   deb 'dnsmasq-base'  = installed
> * better not use '/etc/dnsmasq.d/README' as flag for that as it could be 
> erased
>   by local admin for what ever reason (a README, is a README...)
> 
> The attached patch has been successfully tested to meet this conditions.
> Additionally this patch fixes syntax highlighting of the init script in Vim.

minor patch update. I added a reference to #819856 in the comments.


kind regards,

     Thilo

--- etc-init.d-dnsmasq.orig	2016-04-30 15:36:51.189052127 +0000
+++ etc-init.d-dnsmasq	2016-04-30 15:48:22.261632156 +0000
@@ -7,9 +7,10 @@
 # Default-Stop:   0 1 6
 # Description:    DHCP and DNS server
 ### END INIT INFO
 
-set +e   # Don't exit on error status
+# Don't exit on error status
+set +e
 
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/sbin/dnsmasq
 NAME=dnsmasq
@@ -28,13 +29,12 @@
         . /etc/default/locale
         export LANG
 fi
 
-# /etc/dnsmasq.d/README is a non-conffile installed by the dnsmasq package.
-# Should the dnsmasq package be removed, the following test ensures that
-# the daemon is no longer started, even if the dnsmasq-base package is
-# still in place.
-test -e /etc/dnsmasq.d/README || exit 0
+# The following test ensures the dnsmasq service is not started, when the
+# package 'dnsmasq' is removed but not purged:
+# https://bugs.debian.org/819856
+test -d /usr/share/doc/dnsmasq || exit 0
 
 test -x $DAEMON || exit 0
 
 # Provide skeleton LSB log functions for backports which don't have LSB functions.

Reply via email to