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

Re: invoke-rc.d & systemd



On Sun, 07 Aug 2016, Ansgar Burchardt wrote:
> That might behave different than expected when current state of the
> daemon and the boot configuration differ: for example the sequence above

It shouldn't, unless invoke-rc.d is broken.  The whole reason it exists
is exactly to account for boot state (i.e. enabled/disabled, as opposed
to started/stopped).  Also refer to policy-rc.d, which can tell
invoke-rc.d to ignore any attempts to, e.g., start a service.
invoke-rc.d is meant to be used in "package maintainer scripts", not for
local admin or user to use.

Normal admin work is done using "service", which will do exactly what
you told it to, and doesn't even care for boot state.

> start at boot; or it will stop the daemon if it was manually started but
> is not configured to start automatically at boot.

It has to stop it, yes.  That's exactly the point, since it is meant to
be used during daemon upgrades.  We *usually* don't want a daemon
running while its components and configuration are being updated under
its feet, unless it is a daemon engineered to tolerate it well (which is
actually easy to do on simple daemons, so it is actually the rule rather
than the exception).

-- 
  "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


Reply to: