66 lines
1.5 KiB
Diff
66 lines
1.5 KiB
Diff
|
Add systemd unit files
|
||
|
|
||
|
Signed-off-by: Thorsten Kukuk <kukuk@suse.de>
|
||
|
|
||
|
--- a/Makefile.am
|
||
|
+++ b/Makefile.am 2014/12/10 13:27:31
|
||
|
@@ -45,6 +45,14 @@
|
||
|
AM_CPPFLAGS += $(SYSTEMD_CFLAGS) -DSYSTEMD
|
||
|
|
||
|
rpcbind_LDADD += $(SYSTEMD_LIBS)
|
||
|
+
|
||
|
+systemd/rpcbind.service: systemd/rpcbind.service.in Makefile
|
||
|
+ sed -e 's,@bindir\@,$(bindir),g' \
|
||
|
+ < $< > $@ || rm $@
|
||
|
+
|
||
|
+systemdsystemunit_DATA = \
|
||
|
+ systemd/rpcbind.service \
|
||
|
+ systemd/rpcbind.socket
|
||
|
endif
|
||
|
|
||
|
rpcinfo_SOURCES = src/rpcinfo.c
|
||
|
--- a/systemd/.gitignore
|
||
|
+++ b/systemd/.gitignore 2014/12/10 13:27:31
|
||
|
@@ -0,0 +1 @@
|
||
|
+rpcbind.service
|
||
|
--- a/systemd/rpcbind.service.in
|
||
|
+++ b/systemd/rpcbind.service.in 2014/12/10 13:27:31
|
||
|
@@ -0,0 +1,16 @@
|
||
|
+[Unit]
|
||
|
+Description=RPC Bind
|
||
|
+Documentation=man:rpcbind(8)
|
||
|
+DefaultDependencies=no
|
||
|
+Requires=rpcbind.socket
|
||
|
+Wants=var-run.mount
|
||
|
+After=var-run.mount
|
||
|
+
|
||
|
+[Service]
|
||
|
+Type=notify
|
||
|
+EnvironmentFile=-/etc/sysconfig/rpcbind
|
||
|
+ExecStart=@bindir@/rpcbind $RPCBIND_OPTIONS -w -f
|
||
|
+
|
||
|
+[Install]
|
||
|
+WantedBy=multi-user.target
|
||
|
+Also=rpcbind.socket
|
||
|
--- a/systemd/rpcbind.socket
|
||
|
+++ b/systemd/rpcbind.socket 2014/12/10 13:27:58
|
||
|
@@ -0,0 +1,18 @@
|
||
|
+[Unit]
|
||
|
+Description=RPCbind Server Activation Socket
|
||
|
+DefaultDependencies=no
|
||
|
+Wants=rpcbind.target
|
||
|
+Before=rpcbind.target
|
||
|
+
|
||
|
+[Socket]
|
||
|
+ListenStream=/run/rpcbind.sock
|
||
|
+
|
||
|
+# RPC netconfig can't handle ipv6/ipv4 dual sockets
|
||
|
+BindIPv6Only=ipv6-only
|
||
|
+ListenStream=0.0.0.0:111
|
||
|
+ListenDatagram=0.0.0.0:111
|
||
|
+ListenStream=[::]:111
|
||
|
+ListenDatagram=[::]:111
|
||
|
+
|
||
|
+[Install]
|
||
|
+WantedBy=sockets.target
|