[Pkg-samba-maint] Bug#629406: Bug#629406: Bug#629406: samba-common: create empty /etc/samba/dhcp.conf even if samba-common/dhcp=false

Steve Langasek vorlon at debian.org
Mon Jun 6 18:16:39 UTC 2011


On Mon, Jun 06, 2011 at 07:54:49PM +0200, Christian PERRIER wrote:
> Quoting Luca Capello (luca at pca.it):

> >   Modify smb.conf to use WINS settings from DHCP?

> > Even if I chose "No", every time the machine is rebooted (or a DHCP
> > connection is renewed) an empty /etc/samba/dhcp.conf file is created.
> > This is particular annoying given that etckeeper always complains:

> >   ** etckeeper detected uncommitted changes in /etc prior to apt run
> >   ** Aborting apt run. Manually commit and restart.

> Hmmm, indeed. The /etc/dhcp3/dhclient-enter-hooks.d/samba hook is a
> little bit naive here...

> The attached (untested) patch should fix this by testing if the file
> to be created is non empty before putting it in place. Could you check
> this?

Nack.  The hook script *should* be naive; we don't want to add more
complexity here.

We can move the include file to /run instead.

(Also, checking whether the new file is non-zero in size before copying is
wrong.  When the new DHCP information no longer includes netbios settings,
we *need* to update the config with this fact.)

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20110606/1c830b69/attachment-0001.pgp>


More information about the Pkg-samba-maint mailing list