2014-01-30 15:01:34 +01:00
|
|
|
From 117cc8049b1dec667507f7824ccae3cd1d8b31fb Mon Sep 17 00:00:00 2001
|
2014-01-15 11:14:08 +01:00
|
|
|
From: Olaf Kirch <okir@suse.de>
|
|
|
|
Date: Tue, 20 Aug 2013 16:01:59 +0200
|
2014-01-30 15:01:34 +01:00
|
|
|
Subject: [PATCH 15/24] When using systemd activation, make rpcbind notify
|
2014-01-15 11:14:08 +01:00
|
|
|
system when ready to service requests
|
|
|
|
|
|
|
|
Signed-off-by: Olaf Kirch <okir@suse.de>
|
|
|
|
---
|
|
|
|
src/rpcbind.c | 5 ++++-
|
|
|
|
systemd/rpcbind.service.in | 1 +
|
|
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/src/rpcbind.c b/src/rpcbind.c
|
2014-01-30 15:01:34 +01:00
|
|
|
index 50c042c..6d1f1a3 100644
|
2014-01-15 11:14:08 +01:00
|
|
|
--- a/src/rpcbind.c
|
|
|
|
+++ b/src/rpcbind.c
|
|
|
|
@@ -260,7 +260,10 @@ main(int argc, char *argv[])
|
|
|
|
#endif
|
|
|
|
|
|
|
|
network_init();
|
|
|
|
-
|
|
|
|
+#ifdef SYSTEMD
|
|
|
|
+ if (systemd_activation)
|
|
|
|
+ sd_notify(0, "READY=1");
|
|
|
|
+#endif
|
|
|
|
my_svc_run();
|
|
|
|
rpcbind_log_error("svc_run returned unexpectedly");
|
|
|
|
rpcbind_abort();
|
|
|
|
diff --git a/systemd/rpcbind.service.in b/systemd/rpcbind.service.in
|
|
|
|
index 58ae5de..527d07b 100644
|
|
|
|
--- a/systemd/rpcbind.service.in
|
|
|
|
+++ b/systemd/rpcbind.service.in
|
|
|
|
@@ -2,6 +2,7 @@
|
|
|
|
Description=RPC Bind
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
+Type=notify
|
|
|
|
ExecStart=@bindir@/rpcbind -w -f
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
--
|
|
|
|
1.7.12.4
|
|
|
|
|