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
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.
Fixing typo in Summary
May want to change that head -1 to head -n 1
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....
Created attachment 32961 [details, diff] short and sweet the question marks are intentional - to force a null answer if the file does not exist.
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?
Shouldn't that line in "short and sweet" read: + start-stop-daemon --stop --quiet --pid $mypid && break or the "eend $?" will fail?
*** Bug 57529 has been marked as a duplicate of this bug. ***
*** Bug 60348 has been marked as a duplicate of this bug. ***
Same problem here. Please fix!
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.
Created attachment 40057 [details, diff] A patch to fix restarting in the nscd init script
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 ...
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
*** Bug 66778 has been marked as a duplicate of this bug. ***
*** Bug 67495 has been marked as a duplicate of this bug. ***