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

Re: avoid starting a program during reboot



On Mon 09 Sep 2013 at 13:47:25 +0300, Lars Noodén wrote:

> On 9/9/13 1:39 PM, lina wrote:
> >>
> >> 	update-rc.d -f apache2 remove
> >>
> >> That should get it from all the rc?.d directories.
> > 
> > Gorgeous, thanks both of you.
> 
> An after thought: If you want it to stick permanently even after
> upgrades you will also have to re-populate the directories with stop
> scripts:
> 
> 	update-rc.d apache2 stop 17 0 1 2 3 4 5 6 .

Nobody appears to be taking any notice of what update-rc.dD(8) says:

  A common system administration error is to delete the links with
  the thought that this will "disable" the service, i.e., that
  this will prevent the service from being started.  However, if
  all links have  been  deleted then  the next time the package is
  upgraded, the package's postinst script will run update-rc.d
  again and this will reinstall links at their factory default
  locations.  The correct way to disable services is to  configure
  the  service  as stopped in all runlevels in which it is started
  by default.  In the System V init system this means renaming the
  service's symbolic links from S to K.

So

   update-rc.d apache2 disable

should be used.


Reply to: