On 10/07/14 18:11, Benjamin Cama wrote: > Package: dnsmasq > Version: 2.62-3+deb7u1 > Severity: wishlist > > Hi, > > While configuring dnsmasq today, I stumbled upon a very annoying > behavior: dnsmasq doesn't ignore files not ending in ".conf" in its > /etc/dnsmasq.d/ configuration directory. I had copied the current config > alongside the original file renaming it with ".old" and it took me some > time to realize that the error message I got when restarting dnsmasq > from now on were because dnsmasq read the two files and found duplicate > configuration options. > > The usual way of handling ".d" configuration directories in Debian (to > me, at least) is to only take into account files ending in ".conf", so > that you can have “backup” files or easily ignore some config files. > The current behavior is a bit disturbing when trying to configure > dnsmasq. > > I realize that dnsmasq has no easy way of achieving this (it can only > ignore some patterns, not restrict to some pattern), so this may be > difficult to implement, but I'd be glad if someone found a way to “fix” > this. >
It would be fairly simple to support this upstream, and with hindsight it's a better way to do things. My main concern is that to make the change now introduces a behavior change with the potential to break existing installations. There may be a way around this, since the directive which tells dnsmasq to load the contents of /etc/dnsmasq.d is in /etc/default/dnsmasq # By default search this drop directory for configuration options. # Libvirt leaves a file here to make the system dnsmasq play nice. # Comment out this line if you don't want this. The dpkg-* are file # endings which cause dnsmasq to skip that file. This avoids pulling # in backups made by dpkg. CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new Since /etc/default/dnsmasq is a conffile, that could be left alone for existing installations which are upgrading, but new semantics introduced for new installations, ie delete the line above and add CONFIG_DIR_FILE=etc/dnsmasq.d,.conf with suitable scripting in the init script and an extension of the --conf-dir dnsmasq flag. Opinions? Simon. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org