From 04354d29d37e10c5dad05715df11c92554babcab Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 27 Nov 2001 20:33:20 +0000 Subject: [PATCH] The proper ldd check is now used if a dynamically linked binary is detected to require uClibc rather than libc6. The ldd from the default location of /usr/i386-linux-uclibc/bin is used for uClibc. --- BootRoot/Yard.pm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 3d4d530..c858824 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -532,9 +532,18 @@ sub library_dependencies { ##### Run ldd to get library dependencies. my $line; - ## Busybox uses a different ldd -## foreach $line (`/usr/i386-linux-uclibc/bin/ldd $file`) { - foreach $line (`ldd $file`) { + ## uClibc uses a different ldd --freesource + ## Determine which ldd to use + my $ldd; + my $determine_ldd = `ldd $file 2>&1 1>/dev/null`; + if ( $determine_ldd =~ /BusyBox/ ) { + $ldd = "/usr/i386-linux-uclibc/bin/ldd"; + } + else { + $ldd = "ldd"; + } + + foreach $line (`$ldd $file`) { my($lib) = $line =~ / => (\S+)/; next unless $lib; my($abs_lib) = $lib; @@ -2216,11 +2225,9 @@ sub check_pam { my (%file_check, $ok); foreach my $files ( @file ) { if (!-e "$mount_point/$files") { - info(0,"NO $mount_point/$files\n"); $file_check{$files} = 0; } else { - info(0,"OK $mount_point/$files\n"); $file_check{$files} = 1; } } @@ -2272,11 +2279,9 @@ sub check_pam { my (%file_check, $ok); foreach my $files ( @file ) { if (!-e "$mount_point/$files") { - info(0,"NO $mount_point/$files\n"); $file_check{$files} = 0; } else { - info(0,"OK $mount_point/$files\n"); $file_check{$files} = 1; } } @@ -2294,11 +2299,6 @@ sub check_pam { } - # if (!-e "$mount_point/$file") { - # warning_test "$file2($.): $_\n", - # "\tLibrary $file does not exist on root fs\n"; - # } - } close(PF); }