[systemd-devel] a problem about the order of service shudown in systeamd

lucien xin lucien.xin at gmail.com
Fri Sep 18 01:34:02 PDT 2015


On Fri, Sep 18, 2015 at 3:55 PM, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
> On Fri, Sep 18, 2015 at 10:44 AM, lucien xin <lucien.xin at gmail.com> wrote:
>> I have some services which need to start after "network.target", and
>> shutdown before "network.target". but systemd didn't know "teamd" also
>> belongs to "network.target", so it won't shutdown the service before
>> "teamd".
>>
>> to workaround it, I need to define "After=teamd at team0.service
>> teamd at team1.service...."  to the affected service. but that seems
>> really stupid. are there better ways so if the service require
>> "network.target", systemd will shutdown it before teamd?
>>
>> is there a way to make "teamd" belongs to "network.target",  or
>> another way to meet that requirement?
>>
>
> Just order teamd before network.target

sorry, I cannot follow you.

I mean, now my A.service is shutdown before network.target.
but I also wnat A.service to be shutdown before teamd,
define "After=teamd at team0.service teamd at team1.service...."
in A.service can work, but I hope there is another way,

like there may be another option can make A.service's shutdown
'level' earlier than both teamd and network.target's shutdown 'level'

i do not know, just ask.


More information about the systemd-devel mailing list