[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: update-inetd



On Sun, 14 Jan 2007, Steve Langasek wrote:

> On Sat, Jan 13, 2007 at 10:21:35PM +0100, Peter Palfrader wrote:
> > On Sat, 13 Jan 2007, Steve Langasek wrote:
> 
> > > > * should packages disable inetd config entries on removal and in
> > > > preparation for upgrade, and then reenable the entries after upgrade
> > > > is complete?
> 
> > > No, they shouldn't, because this loses local modifications to the inetd.conf
> > > line.
> 
> > Actually it doesn't.
> 
> > If you call update-inetd with --disable in prerm it just prepends
> > "#<off># " to your line (if the service is enabled), and when you call
> > it in postinst with --enable it will remove the "#<off># ".
> 
> > Running --enable will not touch any lines without the magic '#<off># '
> > token, so if the admin commented out the line with just # (or anything
> > not #<off>#) the service will stay disabled, thereby preserving the
> > admin's configuration.
> 
> Hmm, ack.
> 
> Though one of Brian's questions was about services "that should be disabled
> by default"; disabling those on prerm without enabling them on postinst
> would be wrong because it loses the admin's choice to enable the service.
> Disabling them on prerm and enabling them on postinst would be wrong because
> then it wouldn't be disabled by default.  The only reasonable option I see
> for that case is to call neither --enable nor --disable for the service.


The solution in this case is to install the service with just a #, like
kerberos already does:

| echidna:/var/lib/dpkg/info# grep hprop_entry heimdal-kdc.postinst
| hprop_entry="#krb_prop  stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/hpropd"
| 	update-inetd --group KRB5 --add "$hprop_entry"

Peter
-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/



Reply to: