diff mbox

contrib: add a systemd service file for rpc.fedfsd

Message ID 1320437857-10752-1-git-send-email-jlayton@redhat.com
State Superseded
Headers show

Commit Message

Jeff Layton Nov. 4, 2011, 8:17 p.m. UTC
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 configure.ac                      |    1 +
 contrib/Makefile.am               |    2 +-
 contrib/systemd/Makefile.am       |   29 +++++++++++++++++++++++++++++
 contrib/systemd/rpcfedfsd.service |   28 ++++++++++++++++++++++++++++
 4 files changed, 59 insertions(+), 1 deletions(-)
 create mode 100644 contrib/systemd/Makefile.am
 create mode 100644 contrib/systemd/rpcfedfsd.service

Comments

Chuck Lever Nov. 4, 2011, 11:28 p.m. UTC | #1
Hi Jeff-

This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.

I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?

Maybe we should have a contrib/README to explain what these things are for.

On Nov 4, 2011, at 4:17 PM, Jeff Layton wrote:

> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
> configure.ac                      |    1 +
> contrib/Makefile.am               |    2 +-
> contrib/systemd/Makefile.am       |   29 +++++++++++++++++++++++++++++
> contrib/systemd/rpcfedfsd.service |   28 ++++++++++++++++++++++++++++
> 4 files changed, 59 insertions(+), 1 deletions(-)
> create mode 100644 contrib/systemd/Makefile.am
> create mode 100644 contrib/systemd/rpcfedfsd.service
> 
> diff --git a/configure.ac b/configure.ac
> index b26a4a7..9a93e81 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -150,6 +150,7 @@ AC_SUBST([root_sbindir])
> AC_CONFIG_FILES([Makefile
>                  contrib/Makefile
>                  contrib/init-scripts/Makefile
> +                 contrib/systemd/Makefile
>                  doc/Makefile
>                  doc/ldap/Makefile
>                  doc/man/Makefile
> diff --git a/contrib/Makefile.am b/contrib/Makefile.am
> index 7d68051..9ce39e9 100644
> --- a/contrib/Makefile.am
> +++ b/contrib/Makefile.am
> @@ -23,7 +23,7 @@
> ##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
> ##
> 
> -SUBDIRS			= init-scripts
> +SUBDIRS			= init-scripts systemd
> 
> CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
> DISTCLEANFILES		= Makefile.in
> diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am
> new file mode 100644
> index 0000000..217edda
> --- /dev/null
> +++ b/contrib/systemd/Makefile.am
> @@ -0,0 +1,29 @@
> +##
> +## @file contrib/systemd/Makefile.am
> +## @brief Process this file with automake to produce contrib/systemd/Makefile.in
> +##
> +
> +##
> +## Copyright 2011 Red Hat.  All rights reserved.
> +##
> +## This file is part of fedfs-utils.
> +##
> +## fedfs-utils 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.
> +##
> +## fedfs-utils 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.
> +##
> +## You should have received a copy of the GNU General Public License
> +## version 2.0 along with fedfs-utils.  If not, see:
> +##
> +##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
> +##
> +
> +EXTRA_DIST		= rpcfedfsd.service
> +
> +CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
> +DISTCLEANFILES		= Makefile.in
> diff --git a/contrib/systemd/rpcfedfsd.service b/contrib/systemd/rpcfedfsd.service
> new file mode 100644
> index 0000000..d2f8451
> --- /dev/null
> +++ b/contrib/systemd/rpcfedfsd.service
> @@ -0,0 +1,28 @@
> +##
> +## 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]
> +ExecStart=/usr/sbin/rpc.fedfsd
> +Type=forking
> +
> +[Install]
> +WantedBy=multi-user.target
> -- 
> 1.7.6.4
>
Jeff Layton Nov. 5, 2011, 12:40 a.m. UTC | #2
On Fri, 4 Nov 2011 19:28:21 -0400
Chuck Lever <chuck.lever@oracle.com> wrote:

> Hi Jeff-
> 
> This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.
> 
> I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?
> 
> Maybe we should have a contrib/README to explain what these things are for.
> 

I pretty much "borrowed" it from the example here:

    http://0pointer.de/blog/projects/systemd-for-admins-3.html

and it has a description of all the fields.

It works, but we might want to do some tweaking of this file eventually
-- maybe add a /etc/sysconfig/fedfs file where we can do things like
set command line arguments, etc...

The systemd manpages are pretty comprehensive. A readme might not be a
bad idea, but systemd is still a bit of a moving target. I wouldn't
try to do much more than to tell people that it's for systemd and to
look to its documentation on how to use it.
Chuck Lever Nov. 7, 2011, 9:33 p.m. UTC | #3
On Nov 4, 2011, at 8:40 PM, Jeff Layton wrote:

> On Fri, 4 Nov 2011 19:28:21 -0400
> Chuck Lever <chuck.lever@oracle.com> wrote:
> 
>> Hi Jeff-
>> 
>> This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.
>> 
>> I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?
>> 
>> Maybe we should have a contrib/README to explain what these things are for.
>> 
> 
> I pretty much "borrowed" it from the example here:
> 
>    http://0pointer.de/blog/projects/systemd-for-admins-3.html
> 
> and it has a description of all the fields.
> 
> It works, but we might want to do some tweaking of this file eventually
> -- maybe add a /etc/sysconfig/fedfs file where we can do things like
> set command line arguments, etc...

My rpcfedfsd init script already looks in /etc/sysconfig/nfs.  That can be changed, though.  I guess we want fedfs to be rather more independent of NFS.

> The systemd manpages are pretty comprehensive. A readme might not be a
> bad idea, but systemd is still a bit of a moving target. I wouldn't
> try to do much more than to tell people that it's for systemd and to
> look to its documentation on how to use it.

OK.  I'll see what I can do.
Jeff Layton Nov. 8, 2011, 2:08 a.m. UTC | #4
On Mon, 7 Nov 2011 16:33:48 -0500
Chuck Lever <chuck.lever@oracle.com> wrote:

> 
> On Nov 4, 2011, at 8:40 PM, Jeff Layton wrote:
> 
> > On Fri, 4 Nov 2011 19:28:21 -0400
> > Chuck Lever <chuck.lever@oracle.com> wrote:
> > 
> >> Hi Jeff-
> >> 
> >> This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.
> >> 
> >> I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?
> >> 
> >> Maybe we should have a contrib/README to explain what these things are for.
> >> 
> > 
> > I pretty much "borrowed" it from the example here:
> > 
> >    http://0pointer.de/blog/projects/systemd-for-admins-3.html
> > 
> > and it has a description of all the fields.
> > 
> > It works, but we might want to do some tweaking of this file eventually
> > -- maybe add a /etc/sysconfig/fedfs file where we can do things like
> > set command line arguments, etc...
> 
> My rpcfedfsd init script already looks in /etc/sysconfig/nfs.  That can be changed, though.  I guess we want fedfs to be rather more independent of NFS.
> 

Yes, I meant to mention that when I looked at the script.
/etc/sysconfig/nfs is shipped as part of the nfs-utils package
in Fedora and RHEL. We really want a separate file
here. /etc/sysconfig/fedfs would be more appropriate.

> > The systemd manpages are pretty comprehensive. A readme might not be a
> > bad idea, but systemd is still a bit of a moving target. I wouldn't
> > try to do much more than to tell people that it's for systemd and to
> > look to its documentation on how to use it.
> 
> OK.  I'll see what I can do.
>
Chuck Lever Nov. 8, 2011, 2:20 a.m. UTC | #5
On Nov 7, 2011, at 9:08 PM, Jeff Layton wrote:

> On Mon, 7 Nov 2011 16:33:48 -0500
> Chuck Lever <chuck.lever@oracle.com> wrote:
> 
>> 
>> On Nov 4, 2011, at 8:40 PM, Jeff Layton wrote:
>> 
>>> On Fri, 4 Nov 2011 19:28:21 -0400
>>> Chuck Lever <chuck.lever@oracle.com> wrote:
>>> 
>>>> Hi Jeff-
>>>> 
>>>> This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.
>>>> 
>>>> I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?
>>>> 
>>>> Maybe we should have a contrib/README to explain what these things are for.
>>>> 
>>> 
>>> I pretty much "borrowed" it from the example here:
>>> 
>>>   http://0pointer.de/blog/projects/systemd-for-admins-3.html
>>> 
>>> and it has a description of all the fields.
>>> 
>>> It works, but we might want to do some tweaking of this file eventually
>>> -- maybe add a /etc/sysconfig/fedfs file where we can do things like
>>> set command line arguments, etc...
>> 
>> My rpcfedfsd init script already looks in /etc/sysconfig/nfs.  That can be changed, though.  I guess we want fedfs to be rather more independent of NFS.
>> 
> 
> Yes, I meant to mention that when I looked at the script.
> /etc/sysconfig/nfs is shipped as part of the nfs-utils package
> in Fedora and RHEL. We really want a separate file
> here. /etc/sysconfig/fedfs would be more appropriate.

I can update rpcfedfsd, but do you happen to know what is needed for the new systemd config file to use /etc/sysconfig/fedfs ?

>>> The systemd manpages are pretty comprehensive. A readme might not be a
>>> bad idea, but systemd is still a bit of a moving target. I wouldn't
>>> try to do much more than to tell people that it's for systemd and to
>>> look to its documentation on how to use it.
>> 
>> OK.  I'll see what I can do.
>> 
> 
> 
> -- 
> Jeff Layton <jlayton@redhat.com>
Jeff Layton Nov. 9, 2011, 10:49 a.m. UTC | #6
On Mon, 7 Nov 2011 21:20:52 -0500
Chuck Lever <chuck.lever@oracle.com> wrote:

> 
> On Nov 7, 2011, at 9:08 PM, Jeff Layton wrote:
> 
> > On Mon, 7 Nov 2011 16:33:48 -0500
> > Chuck Lever <chuck.lever@oracle.com> wrote:
> > 
> >> 
> >> On Nov 4, 2011, at 8:40 PM, Jeff Layton wrote:
> >> 
> >>> On Fri, 4 Nov 2011 19:28:21 -0400
> >>> Chuck Lever <chuck.lever@oracle.com> wrote:
> >>> 
> >>>> Hi Jeff-
> >>>> 
> >>>> This looks OK, at first glance.  I'll drop it into 0.8 after check-in testing.
> >>>> 
> >>>> I'm not especially familiar with systemd.  Can you explain (just briefly here in e-mail) what the settings in rpcfedfsd.service do?  How would I use this file on my Fedora 15 system instead of the contrib/init-scripts/rpcfedfsd script?
> >>>> 
> >>>> Maybe we should have a contrib/README to explain what these things are for.
> >>>> 
> >>> 
> >>> I pretty much "borrowed" it from the example here:
> >>> 
> >>>   http://0pointer.de/blog/projects/systemd-for-admins-3.html
> >>> 
> >>> and it has a description of all the fields.
> >>> 
> >>> It works, but we might want to do some tweaking of this file eventually
> >>> -- maybe add a /etc/sysconfig/fedfs file where we can do things like
> >>> set command line arguments, etc...
> >> 
> >> My rpcfedfsd init script already looks in /etc/sysconfig/nfs.  That can be changed, though.  I guess we want fedfs to be rather more independent of NFS.
> >> 
> > 
> > Yes, I meant to mention that when I looked at the script.
> > /etc/sysconfig/nfs is shipped as part of the nfs-utils package
> > in Fedora and RHEL. We really want a separate file
> > here. /etc/sysconfig/fedfs would be more appropriate.
> 
> I can update rpcfedfsd, but do you happen to know what is needed for the new systemd config file to use /etc/sysconfig/fedfs ?
> 

Yes, patch resent that will make it source in /etc/sysconfig/fedfs if
it exists prior to starting the daemon. It's also possible to get a lot
more sophisticated with systemd integration here, but I don't think it's
probably worth it for something like rpc.fedfsd.
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index b26a4a7..9a93e81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,7 @@  AC_SUBST([root_sbindir])
 AC_CONFIG_FILES([Makefile
                  contrib/Makefile
                  contrib/init-scripts/Makefile
+                 contrib/systemd/Makefile
                  doc/Makefile
                  doc/ldap/Makefile
                  doc/man/Makefile
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 7d68051..9ce39e9 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -23,7 +23,7 @@ 
 ##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 ##
 
-SUBDIRS			= init-scripts
+SUBDIRS			= init-scripts systemd
 
 CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
 DISTCLEANFILES		= Makefile.in
diff --git a/contrib/systemd/Makefile.am b/contrib/systemd/Makefile.am
new file mode 100644
index 0000000..217edda
--- /dev/null
+++ b/contrib/systemd/Makefile.am
@@ -0,0 +1,29 @@ 
+##
+## @file contrib/systemd/Makefile.am
+## @brief Process this file with automake to produce contrib/systemd/Makefile.in
+##
+
+##
+## Copyright 2011 Red Hat.  All rights reserved.
+##
+## This file is part of fedfs-utils.
+##
+## fedfs-utils 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.
+##
+## fedfs-utils 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.
+##
+## You should have received a copy of the GNU General Public License
+## version 2.0 along with fedfs-utils.  If not, see:
+##
+##	http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+##
+
+EXTRA_DIST		= rpcfedfsd.service
+
+CLEANFILES		= cscope.in.out cscope.out cscope.po.out *~
+DISTCLEANFILES		= Makefile.in
diff --git a/contrib/systemd/rpcfedfsd.service b/contrib/systemd/rpcfedfsd.service
new file mode 100644
index 0000000..d2f8451
--- /dev/null
+++ b/contrib/systemd/rpcfedfsd.service
@@ -0,0 +1,28 @@ 
+##
+## 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]
+ExecStart=/usr/sbin/rpc.fedfsd
+Type=forking
+
+[Install]
+WantedBy=multi-user.target