rpcbind/rpcbind-systemd-notify.patch
Marcus Meissner 9fd5901665 Accepting request 181216 from home:elvigia:branches:network
- rpcbind-systemd-notify.patch make systemd service type 
  "notify" this is almost the same as the default but 
  with the difference that the daemon now is able to
  to notify systemd when it finished startup hence
  avoiding a race condition in where startup is faster than
  the process finishing its own internal setup routines.

OBS-URL: https://build.opensuse.org/request/show/181216
OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=26
2013-07-01 09:25:17 +00:00

24 lines
567 B
Diff

--- rpcbind-0.2.0_git201103171419.orig/src/rpcbind.c
+++ rpcbind-0.2.0_git201103171419/src/rpcbind.c
@@ -253,7 +253,9 @@ main(int argc, char *argv[])
#endif
network_init();
-
+#ifdef SYSTEMD
+ sd_notify(0, "READY=1");
+#endif
my_svc_run();
rpcbind_syslog(LOG_ERR, "svc_run returned unexpectedly");
rpcbind_abort();
--- rpcbind-0.2.0_git201103171419.orig/systemd/rpcbind.service.in
+++ rpcbind-0.2.0_git201103171419/systemd/rpcbind.service.in
@@ -2,6 +2,7 @@
Description=RPC Bind
[Service]
+Type=notify
ExecStart=@bindir@/rpcbind -w -f
[Install]