Patchwork [05/12] contrib: add a systemd service file for rpc.fedfsd

login
register
mail settings
Submitter Chuck Lever
Date Nov. 11, 2011, 8:26 p.m.
Message ID <20111111202643.10717.13522.stgit@degas.1015granger.net>
Download mbox | patch
Permalink /patch/125285/
State Accepted
Headers show

Comments

Chuck Lever - Nov. 11, 2011, 8:26 p.m.
Distributions are adopting systemd for system initialization, so
provide a systemd alternative to the rpcfedfsd init script.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 contrib/init/Makefile.am       |    2 +-
 contrib/init/rpcfedfsd.service |   29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 contrib/init/rpcfedfsd.service

Patch

diff --git a/contrib/init/Makefile.am b/contrib/init/Makefile.am
index 537b478..ef2f07b 100644
--- a/contrib/init/Makefile.am
+++ b/contrib/init/Makefile.am
@@ -23,7 +23,7 @@ 
 ##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 ##
 
-EXTRA_DIST		= fedfs rpcfedfsd
+EXTRA_DIST		= fedfs rpcfedfsd rpcfedfsd.service
 
 CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
 DISTCLEANFILES		= Makefile.in
diff --git a/contrib/init/rpcfedfsd.service b/contrib/init/rpcfedfsd.service
new file mode 100644
index 0000000..f41e013
--- /dev/null
+++ b/contrib/init/rpcfedfsd.service
@@ -0,0 +1,29 @@ 
+##
+## Copyright 2011 Red Hat.  All rights reserved.
+##
+## rpcfedfsd.service is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2.0 as
+## published by the Free Software Foundation.
+##
+## rpcfedfsd.service is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License version 2.0 for more details.
+##
+## A copy of the GNU General Public License version 2.0 is
+## available here:
+##
+##      http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+##
+
+[Unit]
+Description=FedFS administrative service daemon
+After=syslog.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/fedfs
+ExecStart=/usr/sbin/rpc.fedfsd $RPCFEDFSDARGS
+Type=forking
+
+[Install]
+WantedBy=multi-user.target