Add Requires=buxton2.socket dependency to buxton2.service 03/245403/1
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 8 Oct 2020 05:19:57 +0000 (14:19 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Thu, 8 Oct 2020 07:40:16 +0000 (16:40 +0900)
In emergency mode, buxton2.service runs without buxton2.socket.
This patch prevents buxton2.service from running when buxton2.socket is not running.

In emergency mode, systemd does not start units with an implicit 'Requires=sysinit.target' dependency.
Because buxton2.socket does not have a 'DefaultDependency=no', it implicitly has 'Requires=sysinit.target'.
(Refer: https://www.freedesktop.org/software/systemd/man/systemd.socket.html)

Change-Id: I5ed9765b404012a4bb6036e7779f9c66d5ac5571

packaging/buxton2.service

index 040a7ac..a02b166 100644 (file)
@@ -1,6 +1,7 @@
 [Unit]
 Description=Buxton2 Configuration Service
 DefaultDependencies=no
+Requires=buxton2.socket
 After=systemd-tmpfiles-setup.service cynara.socket dbus.socket
 
 [Service]