Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43076 - [glibc-2.3.3_pre20040117] nscd now stores pid file in /var/run/nscd/nscd.pid
Summary: [glibc-2.3.3_pre20040117] nscd now stores pid file in /var/run/nscd/nscd.pid
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 57529 60348 66778 67495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-27 03:34 UTC by Rui Malheiro
Modified: 2004-12-06 20:06 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for /etc/init.d/nscd (nscd.diff,635 bytes, patch)
2004-02-27 03:53 UTC, Rui Malheiro
Details | Diff
short and sweet (nscd.patch,382 bytes, patch)
2004-06-09 03:23 UTC, Scott Taylor (RETIRED)
Details | Diff
A patch to fix restarting in the nscd init script (nscdrestart.patch,224 bytes, patch)
2004-09-21 01:29 UTC, David
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rui Malheiro 2004-02-27 03:34:35 UTC
After emerging glibc-2.3.3_pre20040117 starting nscd with "/etc/init.d/nscd start" fails because /usr/sbin/nscd now stores the pid file in /var/run/nscd and that directory doesn't exist. 

Also, dtoping nscd with "/etc/init.d/nscd stop" fails because the script is looking for the pid file in /var/run/nscd.pid and now nscd stores the pid file on /var/run/nscd/nscd.pid.

We need to:

a) create the /var/run/nscd directory. (pkg_postinst() in glibc-2.3.3 or as a patch to sys-apps/baselayout?)

b) fix /etc/init.d/nscd, taking care not to break pre-glibc-2.3.3 systems.


Reproducible: Always
Steps to Reproduce:
1. emerge ">glibc-2.3.3_pre"
2. /etc/init.d/nscd start
3. /etc/init.d/nscd stop

Actual Results:  
Step 2 apears to start successfuly, however I get the folowing output in 
syslog: 
=================================================== 
Feb 27 11:29:32 vincent nscd: 8402: /var/run/nscd/nscd.pid: No such file or 
directory 
Feb 27 11:29:32 vincent nscd: 8402: /var/run/nscd/socket: No such file or 
directory 
=================================================== 
 
After creating /var/run/nscd, step 2 is successful, but now step 3 fails with 
no error output 

Expected Results:  
/etc/init.d/nscd should start and stop correctly
Comment 1 Rui Malheiro 2004-02-27 03:53:19 UTC
Created attachment 26456 [details, diff]
patch for /etc/init.d/nscd

Proposed patch to /etc/init.d/nscd. Needs to be improved to cover future
versions of nscd.
Comment 2 Rui Malheiro 2004-02-27 04:02:30 UTC
Fixing typo in Summary
Comment 3 Aaron Gyes 2004-03-27 14:41:36 UTC
May want to change that head -1 to head -n 1
Comment 4 Jens Maus 2004-04-27 09:12:47 UTC
Still bug is still persistent. Here with the latest gentoo portage of nscd it also tries to put its pid file in /var/run/nscd which doesn't exist in the standard installation !
It's really time to fix it....
Comment 5 Scott Taylor (RETIRED) gentoo-dev 2004-06-09 03:23:14 UTC
Created attachment 32961 [details, diff]
short and sweet

the question marks are intentional - to force a null answer if the file does
not exist.
Comment 6 AlterEgo 2004-07-13 07:07:46 UTC
Bump ;-)
The current x86 sys-apps/baselayout-1.9.4-r3 still needs this fix.
Is there a reason the fix proposed by Scott Taylor is not applied?
Comment 7 Clemens Noss 2004-07-17 04:29:00 UTC
Shouldn't that line in "short and sweet" read:
+         start-stop-daemon --stop --quiet --pid $mypid && break
or the "eend $?" will fail?
Comment 8 SpanKY gentoo-dev 2004-07-18 17:46:22 UTC
*** Bug 57529 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2004-08-14 21:35:18 UTC
*** Bug 60348 has been marked as a duplicate of this bug. ***
Comment 10 Klaus Kusche 2004-09-19 06:14:25 UTC
Same problem here.
Please fix!
Comment 11 David 2004-09-21 01:26:05 UTC
It also seems that, at least in my case, '/etc/init.d/nscd restart' does not work as it should as it fails when starting up again.  To fix this, I simply introduced a 2 second wait before stop and start by overriding the 'restart' function.  This may want to be taken into consideration, too.  I have attached a patch.
Comment 12 David 2004-09-21 01:29:14 UTC
Created attachment 40057 [details, diff]
A patch to fix restarting in the nscd init script
Comment 13 SpanKY gentoo-dev 2004-09-24 22:03:17 UTC
agriffis: why is the nscd init script part of baselayout now ?  shouldnt it be part of glibc since changes like this are version specific ?

2.3.2-r11 and earlier use the old location while all the newer ones use /var/run/nscd/nscd.pid ...
Comment 14 SpanKY gentoo-dev 2004-09-28 22:28:05 UTC
nscd has been removed from baselayout and now all glibc's install the nscd init.d script

it figures out the pid file by running $(strings /usr/sbin/nscd | grep nscd.pid), so we should be all set with this bug
Comment 15 SpanKY gentoo-dev 2004-10-08 12:00:49 UTC
*** Bug 66778 has been marked as a duplicate of this bug. ***
Comment 16 SpanKY gentoo-dev 2004-12-06 20:06:20 UTC
*** Bug 67495 has been marked as a duplicate of this bug. ***