[Pkg-sysvinit-devel] Bug#542811: Bug#542811: Bug#542811: invoke-rc.d starts disabled startup scripts

Henrique de Moraes Holschuh hmh at debian.org
Wed Aug 26 23:18:09 UTC 2009


On Fri, 21 Aug 2009, Petter Reinholdtsen wrote:
> > I have disabled several services using "insserv -r", e.g.
> 
> Eh, that is not the supported way to disable services.  The start
> symlinks should be changed to stop symlinks to disable a service the
> supported way.  Try something like this instead (or 'update-rc.d
> script disable' if you have a very recent sysv-rc package :):
> 
>   for s in nfs-common nfs-kernel-server samba; do 
>       for f in /etc/rc?.d ; do
>           if [ -e $f/S??$s ] ; then
>              mv $f/S??$s $f/K01$s
>           fi
>       done
>   done
>   insserv -v # to reorder the stop symlinks based on dependency information
> 
> > Problem: During an upgrade of these services they are started via
> > invoke-rc.d, even though they are not listed in the /etc/rc?.d
> > directory for the current runlevel. This is _fatal_ for a Linux-HA
> > environment with its own resource manager (Heartbeat or Pacemaker).
> 
> I'm not that familiar with the logic of invoke-rc.d, so I will have to
> spend some time to see if I can figure out what is going on there.  I
> agree that invoke-rc.d should not start disabled services.  What
> was/is the output from 'runlevel' when you upgraded the packages?

I recall there was a logic line in invoke-rc.d we could invert, so that when
the target state is unknown (i.e. user did the wrong thing and REMOVED the
links instead of using K links) we would assume the service is disabled
instead of enabled.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh





More information about the Pkg-sysvinit-devel mailing list