[systemd-devel] Can LSBInitScipts specify an dependency on systemd unit?

Ross Lagerwall rosslagerwall at gmail.com
Thu Jun 9 09:02:34 UTC 2016


On Thu, Jun 9, 2016 at 9:55 AM, Bao Nguyen <baondt at gmail.com> wrote:
> Hi everyone,
>
> I have a script written by SysVinit, can I declare ordering of this script
> with a systemd unit in "X-Start-Before:" and "X-Start-After:", for ex
>
> X-Start-Before: systemd_1.service
> X-Start-After: systemd_2.service
>
> Can it be declared like that? Can it work as expected if LSB depends on
> systemd service?
>

With a new enough systemd, you should be able to add a snippet to extend
the initscript like this:
$ cat /etc/systemd/system/my_lsb_service.service.d/local.conf
[Unit]
Requires=systemd_1.service
After=systemd_1.service

--
Ross


More information about the systemd-devel mailing list