Issue on Ordering of systemd services during boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

I have a systemd service A.service and socket B.socket and its corresponding service B.service with the following content:

              

               A.service

                              [Unit]

                              Description=A.service

                             

                              [Service]

                              ExecStart=/root/test start

                              RemainAfterExit=true

                              ExecStop=/root/test stop

                              Type=simple

                             

                              [Install]

                              WantedBy=multi-user.target

                             

               B.socket

                              [Unit]

                              Description=B.socket

                              After=A.service

BindsTo=A.service

                             

                              [Socket]

                              ListenDatagram=XXXX

                              Accept=No

                             

                              [Install]

                              WantedBy=sockets.target

 

              

               B.service

                              [Unit]

                              Description=B.service

                              Requires=B.socket

                             

                              [Service]

                              Type=simple

                              ExecStart=/root/test1

                              StandardInput=socket

                             

                              [Install]

                              WantedBy=multi-user.target

 

 

I need B.socket to start only after A.service during boot. However, even after setting After=A.service and BindsTo=A.service in B.socket, sometimes B.socket is starting before A.service.

 

Please let me know if I am missing something.

 

 

Thanks and Regards,

Yashashvi

 

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux