Hi there! NB, I tried to answer all emails at once, thus re-ordering the quoting, I hope I did not miss anything...
On Mon, 06 Jun 2011 19:20:48 +0200, Steve Langasek wrote: > On Mon, Jun 06, 2011 at 02:17:04PM +0200, Luca Capello wrote: >> The following question is asked at samba-common installation: >> >> Samba Server >> >> If your computer gets IP address information from a DHCP server on the >> network, the DHCP server may also provide information about WINS >> servers ("NetBIOS name servers") present on the network. This >> requires a change to your smb.conf file so that DHCP-provided WINS >> settings will automatically be read from /etc/samba/dhcp.conf. >> >> The dhcp3-client package must be installed to take advantage of this >> feature. ^^^^^^^^^^^^ BTW, I completely missed this, which is a bug, this should be changed to isc-dhcp-client (I could clone this bug or submit a new one, but IMHO is a waste of time, given that dhcp3-client is still in sid). >> 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. > > The debconf question has never been intended to govern whether the dhcp hook > script runs, only whether samba makes use of the information. We could > possibly move this file into /run, if that would help. We must, otherwise there is no possibility to have a read-only root. Given that, I added it to the corresponding wiki page: <https://wiki.debian.org/ReadonlyRoot?action=diff&rev1=32&rev2=33> > Doesn't etckeeper have an 'ignore' facility? Yes, but I do not think this should be added there, cc:ing Joey. As far as I read the FHS, /etc should contain *static* configuration files, which is not the case for /etc/samba/dhcp.conf: <http://www.pathname.com/fhs/pub/fhs-2.3.html#ETCHOSTSPECIFICSYSTEMCONFIGURATION> /etc : Host-specific system configuration Purpose The /etc hierarchy contains configuration files. A "configuration file" is a local file used to control the operation of a program; it must be static and cannot be an executable binary. [4] [4] The setup of command scripts invoked at boot time may resemble System V, BSD or other models. Further specification in this area may be added to a future version of this standard. On Tue, 07 Jun 2011 07:14:42 +0200, Christian PERRIER wrote: > On Mon, 06 Jun 2011 20:16:39 +0200, Steve Langasek wrote: >> On Mon, Jun 06, 2011 at 07:54:49PM +0200, Christian PERRIER wrote: >>> On Mon, Jun 06, 2011 at 02:17:04PM +0200, Luca Capello wrote: >>>> >>>> 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. [...] >>> 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? Christian, given that there is no consensus yet, I have not tested your patch. Feel free to ask for it and I will gladly do. >> 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. > > And update smb.conf accordingly? Even if smb.conf has been modified > by the local admin? Please note that neither `man smb.conf` nor the samba-doc package contain any reference to dhcp.conf. I thus went to the Samba upstream website, but neither "Using Samba, 2nd Edition, chapter 6, 'The Samba Configuration File'" nor the daily docs build contain dhcp.conf: <http://www.samba.org/samba/docs/using_samba/ch06.html> <http://www.samba.org/~samba-bugs/docs/> To me it seems that /etc/samba/dhcp.conf is Debian-specific, i.e. not an upstream configuration file. Given that this file is intended to be created when using DHCP through the isc-dhcp-client package, I think the only proper location is /run/samba/dhcp.conf. I do not think there is any problem in having it included or not in /etc/samba/smb.conf: if we continue to manage this through debconf, installing the samba-common package or reconfiguring it suppose that (at least) /etc is writable. Thx, bye, Gismo / Luca
pgp71Wdhep4WJ.pgp
Description: PGP signature