[systemd-devel] systemd-sysv-generator bug ?

Lennart Poettering lennart at poettering.net
Fri Nov 18 17:36:10 UTC 2016


On Fri, 18.11.16 15:46, Cédric BRINER (cedric.briner at unige.ch) wrote:

> Hi,
> 
> We used to have a custom init script written for systemV that was working.
> 
> Now, for some unknown reason, systemd does not to treat this init script
> as it used to be.
> 
> The init script is a bit odd, as it does not start the daemon itself.
> This task is done by an admin that launches it through the console. This
> step does not interact with the init script nor with systemd.
> 
> So the init script is mainly used, to stop the daemon nicely.
> 
> With systemd, some filesystems (local_fs) that supports the database of
> this daemon are unmounted before the stop command of the daemon starts.
> This corrupts our database.
> 
> It *feels* that systemd considers an init script-stop to follow the Unit
> contraints only if the service is in a certain state. Which is not the
> case for systemV and for our case :/
> 
> So... am I a bit right on this topic?
> 
> If so how can I instruct this service to execute the ExecStop before
> unmounting the local_fs. And don't tell me to specify RequiresMountsFor
> with the listing of mount, as this has been tested with no success.

systemd will only stop services at shutdown that are running. That
means you need to make sure your SysV script is properly hooked into
the start runlevels too, even if its start verb is just a nop.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list