From f256edcc87a1504987449ccf779fa02c1866a5b1 Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 27 Nov 2001 20:56:09 +0000 Subject: [PATCH] Fixed nss test so that it checks for the right libnss_(service).so.$version if glibc 2.2 is used. Glibc 2.0 and 2.1 used 1 and 2 respectively, but 2.2 uses 2. --- BootRoot/Yard.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index c858824..800b6ff 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -2342,10 +2342,15 @@ sub check_nss { info(0, "You're using $libc\n"); } - ## Have no idea why this was being done, must have been true in - ## the historic past as noted above. --freesource - #my($X) = $libc_version + 1; - my($X) = $libc_version; # better than the return value + ## glibc 2.2 uses version 2 for its services + ## + my $X; + if ( $libc_version == 2 ) { + $X = $libc_version; + } + else { + $X = $libc_version + 1; + } if (-e $nss_conf) { open(NSS, "<$nss_conf") or die "open($nss_conf): $!";