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

Re: enable/disable flags in /etc/default



On Wed, Mar 02, 2011 at 03:42:28PM +0200, Faidon Liambotis wrote:
> > That means:
> > # mv /etc/rc2.d/S??apache2 /etc/rc2.d/K00apache2
> > # insserv # this bit is not documented, it seems

> Are you serious? How's that a sysadmin interface? Yes, everything can be
> done using sh/cp/mv/vi, but this is hardly something that's either
> properly documented or a replacement for the current method of doing things.

*What* "current method"?

At present there *is* no reliable sysadmin interface for enabling/disabling
services.  update-rc.d is not it; many admins have been using 'update-rc.d
-f remove' for years, but this is /wrong/ and it is /documented/ that this
will cause the links to be readded on package upgrade.  policy-rc.d is not
it; the spec for this is bloated and I've never heard of an admin who's ever
bothered implementing anything more than a "don't start any services in a
chroot" policy using this.  And /etc/default/* isn't it; no consistent
variable naming, not implemented for all services (and shouldn't be), so
it's not scriptable, so it requires vi.

So the mv command above *is* the current method.  And we're in desperate
need of a better one.

> Also, while we're at update-rc.d's documentation, that particular
> manpage says:
> >        Example of disabling a service:
> >           update-rc.d -f foobar remove
> >           update-rc.d foobar stop 20 2 3 4 5 .
> Have you tried that recently? It doesn't work in squeeze systems.

Sounds like a bug; has anyone filed it?  (Or is it just that insserv doesn't
know about the change and needs to be rerun?)

> On the other hand, update-rc.d has enable/disable since squeeze, but
> this is considered an unstable interface, AFAIK.

Hmm.  I don't think update-rc.d is the right place for this anyway (we
should fix things to have proper layering so that 'update-rc.d' is
exclusively an internal package interface, and 'service' is exclusively an
admin interface), but where do you see that update-rc.d enable/disable is an
unstable interface?  It's not documented as such in the manpage.

Thanks,
-- 
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@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: