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

Re: Feedback needed: How to disable services at startup... and keep them so.



On Tue, 07 Dec 2010 15:46:50 -0700, Bob Proulx wrote:

> Arthur Machlas wrote:
>> Camaleón wrote:
>> > Are you suggesting to manually edit the "/etc/init.d/network-manager"
>> > script header to fit my needs? Correct me if I'm wrong, but I expect
>> > this file (as any file located here) can be updated at any time and
>> > so replacing any of the customized values I can have written in there
>> > :-?
>>
>> Yes, that is what I am suggesting. And if the upgrade overwrites your
>> changes, you should file a bug report and ask the maintainer to come
>> into compliance with Debian Policy:
> 
> Let me confirm this.  I have done this many times.  You are allowed
> local modification of /etc/init.d/ scripts.  (Postfix with SASL requires
> it.)  When a new package is installed it will be handled as a conffile. 
> That is to say that interface will be to ask you (if interactive)
> whether you want to install the new or keep the old with the default
> being to keep the old.  The files will be saved with a .dpkg-old or
> .dpkg-new extension as appropriate if you want to merge changes in
> later.  Since the default is to keep your installed and modified file
> this can never be changed automatically to start the new file.
> 
> Therefore a very simple way to prevent a service from running is to edit
> the /etc/init.d/ script and put an 'exit 0' as the second line of the
> script.  Do your self a favor and place a comment there for you to read
> when you come back to it later.  It will show up in the diff between the
> old and new files and remind you of the details.

O.k. But let me first to get more information about why using "update-
rc.d" is failing.

> 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)
> 
> Just as a side suggestion, removing the package seems cleanest.  But if
> you are worried then what I would do is to download the .deb and save it
> into a good place locally.  I move copies of debs I want to cache from
> /var/cache/apt/archives/ to /root/system/ on my machine. Then you can
> safely remove the package.  If as a risk management issue you found that
> you needed it to get networking up and running then you can install it
> from the local copy (without networking) and get networking up and
> online.  And then of course at that time you could always update to any
> version that came later than your cached version by doing an online
> update.

Uninstalling is not an option. I want to keep NM available and ready to 
be launched, just in case. OTOH, there are another packages I would like 
to keep installed but not started by default so I need to know the best 
(recommended way) to do it.

Thanks for your comments, now I know editing script header is feasible 
and should be honored. Before going that path, I'm gonna make some 
attemps with update-rc.d. I'll keep you informed :-)

Greetings,

-- 
Camaleón


Reply to: