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

Reindl Harald h.reindl at thelounge.net
Fri Nov 18 17:32:20 UTC 2016



Am 18.11.2016 um 15:46 schrieb Cédric BRINER:
> 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
>
> If so how can I instruct this service to execute the ExecStop before
> unmounting the local_fs.


first by replace that crap by a systemd-unit and if it does nothing else 
than call the shellscript in ExecStart and ExecStop

second as you say it's only used at shutdown then it don't need 
ExecStart at all, just Type=oneshot and ExecStop, you can also use 
ExecStart=/bin/true for such cases

and finally: order you After/Before correctly since stop of services at 
shutdown happens in the exactly reversed ordering than their start at 
boot which should make it pretty clear

> And don't tell me to specify RequiresMountsFor
> with the listing of mount, as this has been tested with no success

that sentence is worthless without saying waht you have tried

dozens of times people are coming here with RequiresMountsFor=/var/run 
not realizing that this is a symlink to /run and so never can do what 
one thinks it does because they symlink exists in different lifecycles 
times than mounts where it points to


More information about the systemd-devel mailing list