Subject: Allow "/etc/init.d/dnsmasq reload"                                     
                                                  
Package: dnsmasq                                                                
                                                  
Version: 2.55-2                                                                 
                                                  
Severity: wishlist
Tags: patch

According to the man page, dnsmasq listens to SIGHUP and will reload its 
configuration files when the signal is received. It is common to enable the 
"reload" action in init scripts to send SIGHUP to a daemon; however, the 
Debian init script for dnsmasq does not appear to offer this.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dnsmasq depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  dnsmasq-base                  2.55-2     A small caching DNS proxy and 
DHCP
ii  netbase                       4.45       Basic TCP/IP networking system

dnsmasq recommends no packages.

Versions of packages dnsmasq suggests:
ii  resolvconf                    1.48       name server information handler

-- Configuration Files:
/etc/dnsmasq.conf changed [not included]

-- no debconf information

Here's a patch that adds the functionality in question:

--- /etc/init.d/dnsmasq 2010-06-02 21:07:10.000000000 +0200
+++ /etc/init.d/dnsmasq.new     2011-02-11 14:46:59.000000000 +0100
@@ -246,6 +246,16 @@
                        ;;
        esac
        ;;
+  reload)
+       if [ -f /var/run/dnsmasq/$NAME.pid ]; then
+           log_action_begin_msg "Reloading dnsmasq configuration"
+           if kill -HUP `cat /var/run/dnsmasq/$NAME.pid`; then
+               log_action_end_msg 0
+           else
+               log_action_end_msg 1
+           fi
+       fi
+       ;;
   status)
        log_daemon_msg "Checking $DESC" "$NAME"
        status



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to