Bug 2707

Summary: ifup complains about missing nscd
Product: Mageia Reporter: Frederik Himpe <fhimpe>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: dan, dmorganec, mageia, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: initscripts CVE:
Status comment:

Description Frederik Himpe 2011-09-12 11:41:23 CEST
when running ifup while nscd is not installed, there is an error message
/usr/sbin/nscd: No such file or directory

apparently triggered on line 419 of /etc/sysconfig/network-scripts/network-functions.

Before trying to execute nscd, it should check whether /usr/sbin/nscd is installed, in order to prevent this useless error message.
Comment 1 Marja Van Waes 2011-11-25 16:15:00 CET
@ Frederik

Sorry for replying so late. We are very short on triagers.

nscd is in glibc

when looking at the dependencies of initscripts, I see, amongst others:

libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libc.so.6(GLIBC_2.8)
libglib-2.0.so.0 

But I really don't know whether there should be a line with:
glibc
or with:
nscd

@ Colin
I saw you committed initscripts several times. Can you please help with this?

CC: (none) => marja11

Comment 2 Frederik Himpe 2011-11-25 16:30:18 CET
nscd is generated from glibc SRPM, but it's a separate binary package and so it's possible that it's not installed while glibc is.

However adding Requires: nscd to the initscripts SPEC is wrong IMO, the scripts should simply be fixed to check whether nscd exists before using it, something like
if [ -e /usr/sbin/nscd ]
then
   /usr/sbin/nscd
fi

or whatever needs to be done
Comment 3 Marja Van Waes 2012-01-22 19:43:41 CET
(In reply to comment #2)
> nscd is generated from glibc SRPM, but it's a separate binary package and so
> it's possible that it's not installed while glibc is.
> 
> However adding Requires: nscd to the initscripts SPEC is wrong IMO, the scripts
> should simply be fixed to check whether nscd exists before using it, something
> like
> if [ -e /usr/sbin/nscd ]
> then
>    /usr/sbin/nscd
> fi
> 
> or whatever needs to be done

adding two committers of initscripts to cc of this report

CC: (none) => dmorganec, mageia

Dan Fandrich 2012-01-24 20:16:43 CET

CC: (none) => dan

Comment 4 Marja Van Waes 2012-04-26 21:48:59 CEST
is this bug still valid?
Comment 5 Dan Fandrich 2012-04-26 22:46:59 CEST
ifup still produces that error message on a fully-patched Mageia 1 machine. I agree with Frederik Himpe's suggested solution in comment #2.
Comment 6 Colin Guthrie 2012-04-27 00:56:55 CEST
The bug is simply that the || on that line should be a &&. So a sufficient fix would be that, not an additional check. However, this bug is against cauldron where the issue is fixed.

I don't think this is such a critical problem that it would warent an update on mga1.

It does however highlight an issue on cauldron which is that the /var/lock/subsys/nscd file used here no longer exists when running under systemd.

I'll fix it to check the "pidof nscd" instead which should cover both bases.
Comment 7 Colin Guthrie 2012-04-27 01:03:32 CEST
OK, I've now fixed that. As this is reported against cauldron, I'll close. If it's really something that should be pushed to mga1 and someone feels strongly enough, please open a new bug.

Thanks for the report :)

Status: NEW => RESOLVED
Resolution: (none) => FIXED