[PATCH] Add systemd unit file for nscd

Andreas Jaeger aj@suse.com
Tue Apr 30 15:42:00 GMT 2013


On 04/30/2013 08:16 AM, Allan McRae wrote:
> Provide an example systemd unit and tmpfile for running nscd.
> ---
>   nscd/nscd.service  | 17 +++++++++++++++++
>   nscd/nscd.tmpfiles |  1 +
>   2 files changed, 18 insertions(+)
>   create mode 100644 nscd/nscd.service
>   create mode 100644 nscd/nscd.tmpfiles
>
>
> I have followed the convention of nscd.conf and not added a configure
> option to install these files, although I would not mind if that
> changed.

Let's try to sync the contents first between distributions.

I'm fine with adding it to glibc.


> ChangeLog:
>
> 2013-04-30  Allan McRae  <allan@archlinux.org>
>
> 	* nscd/nscd.service: New file.
> 	* nscd/nscd.tmpfiles: New file.
>
>
> diff --git a/nscd/nscd.service b/nscd/nscd.service
> new file mode 100644
> index 0000000..bc80a07
> --- /dev/null
> +++ b/nscd/nscd.service
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=Name Service Cache Daemon
> +After=syslog.target

syslog.target is redundant, this is not needed with recent systemd anymore

> +
> +[Service]
> +Type=forking
> +ExecStart=/usr/sbin/nscd

We at SUSE use ExecStart=/usr/sbin/nscd --foreground
and thus Type=simple

> +ExecStop=/usr/sbin/nscd --shutdown
> +ExecReload=/usr/sbin/nscd -i passwd
> +ExecReload=/usr/sbin/nscd -i group
> +ExecReload=/usr/sbin/nscd -i hosts
> +ExecReload=/usr/sbin/nscd -i services
> +Restart=always
> +PIDFile=/run/nscd/nscd.pid
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/nscd/nscd.tmpfiles b/nscd/nscd.tmpfiles
> new file mode 100644
> index 0000000..8a24a78
> --- /dev/null
> +++ b/nscd/nscd.tmpfiles
> @@ -0,0 +1 @@
> +d /run/nscd 0755 root root

This is fine,

Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list