On Sat, Aug 12, 2006 at 10:17:40AM +0200, Peter Eisentraut wrote: > Christian Perrier wrote: > > Do we do it silently without prompting? This is, strictly speaking, > > non policy compliant....but who wants a package that will panic after > > an upgrade?
> You might be thinking of conffiles, but smb.conf is not a conffile. However, there are cases in which we cannot reliably edit a user's smb.conf file, if it makes use of certain features. There is already a debconf question for this; I'm going to move this code for removing 'guest' into the corresponding block of the postinst. > Index: samba-common.postinst > =================================================================== > --- samba-common.postinst (Revision 1121) > +++ samba-common.postinst (Arbeitskopie) > @@ -136,4 +136,8 @@ > > db_stop > > +if [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.0.23b-2; then > + sed -i -e 's/^\([[:space:]]*passdb backend = > [[:alpha:]][[:alpha:]]*\) guest$/\1/' /etc/samba/smb.conf > +fi > + > #DEBHELPER# > Btw., is there anything wrong with using "sed -i"? The rest of the > postinst seems to go out of its way to handle sed with manual temp files. Yes, there is: sed -i is not an atomic file replacement, so there is a window during which a failure (kernel panic, power outage, filesystem error...) would cause the user's smb.conf to be lost. I'll fix this as well to be consistent with the handling of other smb.conf updates. Finally, there is the possibility that the user has other passdb backends stacked in their existing config besides 'guest', which AIUI worked previously but is no longer supported. This is not the common case, but it is a case which will leave a broken system after upgrade, so we should notify the user of this problem. This will be a separate commit from my tweaks to the above patch, though, and I have no objections to an upload before that part's done. Cheers, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/