This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add systemd unit file for nscd


On 30/04/13 17:49, Andreas Jaeger wrote:
> 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.

OK - Arch uses what I posted, and will make both the adjustments you
suggested below.

I also checked Fedora's service file. The only real difference is:

EnvironmentFile=-/etc/sysconfig/nscd
ExecStart=/usr/sbin/nscd --foreground $NSCD_OPTIONS

which I am told is not the correct systemd way to do those things these
days.

> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]