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

Andrei Borzenkov arvidjaar at gmail.com
Thu Jun 9 10:02:15 UTC 2016


On Thu, Jun 9, 2016 at 1:00 PM, Jóhann B. Guðmundsson
<johannbg at gmail.com> wrote:
> On 06/09/2016 09:02 AM, Ross Lagerwall wrote:
>
>> On Thu, Jun 9, 2016 at 9:55 AM, Bao Nguyen <baondt at gmail.com> wrote:
>> 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
>
>
> That's just silly and introduces another level of administrator headache.
>

It is not silly if you have third-party software that comes with
initscript and need to fix dependencies of this script locally. You
have no control of script itself in this case.

But yes, if you are able to modify initscript it is really easier to
just add proper unit defnition.


More information about the systemd-devel mailing list