This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add systemd unit file for nscd
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Allan McRae <allan at archlinux dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 10 May 2013 15:44:33 -0400
- Subject: Re: [PATCH] Add systemd unit file for nscd
- References: <1367302602-21639-1-git-send-email-allan at archlinux dot org> <517F7773 dot 90009 at suse dot com> <517F9C9B dot 4020905 at archlinux dot org> <518C41B8 dot 60502 at archlinux dot org>
On 05/09/2013 08:39 PM, Allan McRae wrote:
> Any further comments on this? Update version below.
>
>
> ChangeLog:
>
> 2013-05-10 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..5541189
> --- /dev/null
> +++ b/nscd/nscd.service
> @@ -0,0 +1,16 @@
> +[Unit]
> +Description=Name Service Cache Daemon
> +
> +[Service]
> +Type=simple
> +ExecStart=/usr/sbin/nscd --foreground
> +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
Looks good to me. I'm happy to have glibc install support
for everything and have the distros cut out what they don't
need versus having to reinvent the wheel.
I am also interested in a fix for this if anyone is working on it :-)
https://bugzilla.redhat.com/show_bug.cgi?id=947617
My notes say:
~~~
The code shows that nscd is using AF_UNIX SOCK_STREAM.
The code also shows that nscd is unlinking /var/run/nscd/socket
and recreating it later at thrad startup, which likely means
it can't inherit a listening socket from the parent.
Both of this things we can fix, one is a fix to nscd.socket,
the other a fix to nscd itself, perhaps with a new option
(or just avoiding the unlink call in some safe way).
~~~
Cheers,
Carlos.