disabling dnsmasq in /etc/default/dnsmaq disables init.d script

Bug #291186 reported by didgethesky
2
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Fix Released
Low
Thierry Carrez

Bug Description

Binary package hint: dnsmasq

Ubuntu 8.04, package dnsmasq

Setting "ENABLED=0" in /etc/default/dnsmaq to prevent dnsmasq from starting at next boot time completely disables the /etc/init.d/dnsmasq script. That script contains the line
test "$ENABLED" != "0" || exit 0
near its beginning and therefore never evaluates its start/stop/restart parameter.

I don't think this is the intended/expected behavior. Example:
I wanted to stop dnsmasq on my box and keep it deactivated on further reboots because I introduced a new dhcp server to my network. Not seeing any reason for a special order I first set ENABLED=0 and then did "sudo /etc/init.d/dnsmasq stop". After getting wrongly assigned ip adresses I rechecked and found the dnsmasq process still running. To stop it (the "official" way) I had to set ENABLED=1 again.

In my opinion, disabling the starting of a daemon should not prevent the user from stopping an already running instance.

description: updated
Revision history for this message
Thierry Carrez (ttx) wrote :

According to the comment in the file ("Whether or not to run the dnsmasq daemon; set to 0 to disable"), ENABLED should control if the dnsmasq daemon is run at startup, not if the init script is totally disabled, so I tend to agree with the reporter.

In particular, running "/etc/init.d/dnsmasq status" would always return 0 if ENABLED=0... and that means "started".

Changed in dnsmasq:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Thierry Carrez (ttx) wrote :

Fixed in Debian >=2.47-1, should be closed by sync (bug 328992)

Changed in dnsmasq:
assignee: nobody → tcarrez
status: Confirmed → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

Fixed in Jaunty by sync to 2.47-3

Changed in dnsmasq:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.