[RFC][PATCH rpcbind 4/4] systemd/rpcbind.service.in: Want/After systemd-tmpfiles-setup

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

 



Add Want/After systemd-tmpfiles-setup.service. This is taken from Fedora
rpcbind-0.2.4-5.fc25 patch [1] which tried to handle bug #1401561 [2]
where /var/run/rpcbind.lock cannot be created due missing /var/run/
directory. But the suggestion to add RequiresMountFor=... was
implemented in ee569be ("Fix boot dependency in systemd service file").

But even with RequiresMountsFor=/run/rpcbind in rpcbind.service and
/run/rpcbind.lock there is error on openSUSE Tumbleweed with rpcbind
1.2.6:

rpcbind.service: Failed at step NAMESPACE spawning /usr/sbin/rpcbind: Read-only file system

Adding systemd-tmpfiles-setup.service fixes it.

NOTE: Debian uses for this purpose remote-fs-pre.target (also works, but
systemd-tmpfiles-setup.service looks to me more specific).
openSUSE uses only After=sysinit.target as a result of #1117217 [3]
(also works).

[1] https://src.fedoraproject.org/rpms/rpcbind/blob/rawhide/f/rpcbind-0.2.4-systemd-service.patch
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1401561
[3] https://bugzilla.suse.com/show_bug.cgi?id=1117217

Signed-off-by: Petr Vorel <pvorel@xxxxxxx>
---
 systemd/rpcbind.service.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
index 272e55a..771b944 100644
--- a/systemd/rpcbind.service.in
+++ b/systemd/rpcbind.service.in
@@ -7,7 +7,8 @@ RequiresMountsFor=@statedir@
 # Make sure we use the IP addresses listed for
 # rpcbind.socket, no matter how this unit is started.
 Requires=rpcbind.socket
-Wants=rpcbind.target
+Wants=rpcbind.target systemd-tmpfiles-setup.service
+After=systemd-tmpfiles-setup.service
 
 [Service]
 ProtectSystem=full
-- 
2.45.2





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux