From bfed2bb88f9a6a10898b3747f981520af7765840 Mon Sep 17 00:00:00 2001 From: freesource Date: Mon, 18 Nov 2002 17:48:54 +0000 Subject: [PATCH] This corrects nss_check so that the proper version from libc6 is recognized for nss libraries. Hopefully, this corrects problems for even newer libc6 versions in the future. --- BootRoot/Yard.pm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index bc57d20..8145489 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -3262,7 +3262,7 @@ sub find_nss { my @nss_libs; my($libc) = yard_glob("/lib/libc-*"); ## removed 2 - my($libc_version) = $libc =~ m|/lib/libc-\d+\.(\d)|; ## changed 2 & . + my($libc_version2, $libc_version) = $libc =~ m|/lib/libc-(\d)+\.(\d)|; ## changed 2 & . if (!defined($libc_version)) { info(0,"\nParsing $nss_conf:\n"); warning_test "Can't determine your libc version\n"; @@ -3270,13 +3270,23 @@ sub find_nss { info(0,"\nParsing $nss_conf:\n"); info(0, "Using NSS libraries from $libc\n"); } + - ## glibc 2.2 uses version 2 for its services --freesource + ## glibc 2.(2) uses version 2 for its services --freesource ## my $X; if ( $libc_version == 2 ) { $X = $libc_version; } + ## glic 2.(3) uses version 3 for its services --freesource + elsif ( $libc_version2 == 2 && $libc_version == 3 ) { + $X = $libc_version2; + } + ## hopefully should work when (2).4 or greater comes + elsif ( $libc_version2 >= 2 ) { + $X = $libc_version2; + } + ## annoying reality which means things have to be hardcoded --freesource else { $X = $libc_version + 1; } @@ -3308,7 +3318,7 @@ sub find_nss { return @nss_libs; } - + } # end sub find_nss