Re: Feedback needed: How to disable services at startup... and keep them so.
On Thu, Dec 09, 2010 at 04:50:52AM -0500, Tom H wrote:
> On Thu, Dec 9, 2010 at 2:56 AM, Joel Roth <joelz@pobox.com> wrote:
> > On Wed, Dec 08, 2010 at 08:24:51PM +0100, Sven Joachim wrote:
> >> On 2010-12-07 17:21 +0100, Camaleón wrote:
>
>
> >> > A month ago, I disabled Network Manager service in my Squeeze system so
> >> > it doesn't run on start up. I wanted to keep NM installed (just in case)
> >> > but preferred to use the old "ifup" network setup method.
> >> >
> >> > So I issued "update-rc.d network-manager remove" and also disabled gnome
> >> > NM applet from being started.
> >>
> >> You should use "update-rc.d network-manager disable" instead. See
> >> update-rc.d(8).
> >
> > With that approach, how can you get a list of
> > services that have been disabled using updated-rc.d?
>
> Not AFAIK. But you can use "service --status-all" to get some idea...
Hi,
It returns three results
[+]
[?]
[-]
But the docs do not document what these codes signify.
> > btw, I am curious that Debian now has several ways to enable/disable
> > services.
> >
> > - installing/removing the package with apt-get
> > - editing the /etc/default/servicename file
> > - managing the symlinks with update-rc.d
> > - the permissions of the /etc/init.d/servicename script
>
> I couldn't agree less with your list. :)
I'm not sure I *agree* with my list as a good way to
accomplish the goal. Rather as complicating the process
of troubleshooting services for a green administrator.
(Many people running Debian consider themselves *users*.)
> > - installing/removing the package with apt-get
> It doesn't work for someone who wants to disable samba or
> nfs-kernel-server in some locations and enable it in others.
>
> > - editing the /etc/default/servicename file
> I can't think of anything other than bootlogd that meets this criterion.
There are others. Sort of like a shadow government--you
want to do something, but nothing happens till certain
significant yet hidden people say "yes".
(Well, if I don't like it, I suppose I can find some debian-policy
list to flame. :-)
> > - managing the symlinks with update-rc.d
> Yes, although I'm not convinced that Squeeze/Sid with insserv and
> concurrency booting.
I haven't tested it either, however this method has been the bulk
of the discussion on the current thread.
> > - the permissions of the /etc/init.d/servicename script
> It's a hack (as was the "exit 0" suggestion) that'll only work if
> there's a box has a single admin and the package that owns a script
> doesn't overwrite it through an update/upgrade.
I believe the package manager (although not necessarily a
sleepy-eyed administrator) will notice difference in
permissions or file contents from the package supplied
script.
btw, I couldn't disagree with you more :-) in that using
permissions is certainly a legitimate way to administer a system.
What better methods could you suggest? Or are you suggesting
we need yet another?
Best,
Joel
--
Joel Roth
Reply to: