From 697c0e519ad31cfc29d750a5743dddb24023c588 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 29 Oct 2006 10:43:41 +0000 Subject: * --root-path now defaults to '/' * if any of the given files doesn't exist, slxldd now bails git-svn-id: http://svn.openslx.org/svn/openslx/trunk@480 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/slxldd | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'config-db/slxldd') diff --git a/config-db/slxldd b/config-db/slxldd index ea682d80..230959a5 100755 --- a/config-db/slxldd +++ b/config-db/slxldd @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# slxldd.pl - OpenSLX-rewrite of ldd that works on multiple architectures. +# slxldd - OpenSLX-rewrite of ldd that works on multiple architectures. # # (c) 2006 - OpenSLX.com # @@ -22,6 +22,14 @@ use File::Glob ':globally'; use Getopt::Long; use Pod::Usage; +# add the lib-folder and the folder this script lives in to perl's search +# path for modules: +use FindBin; +use lib "$FindBin::RealBin/../lib"; + # production path +use lib "$FindBin::RealBin"; + # development path + use OpenSLX::Basics; my ( @@ -34,6 +42,7 @@ my ( %libInfo, ); +$rootPath = '/'; GetOptions( 'help|?' => \$helpReq, 'root-path=s' => \$rootPath, @@ -71,6 +80,10 @@ foreach my $file (@ARGV) { $file = "$rootPath/$file"; } + if (!-e $file) { + die _tr("slxldd: unable to find file '%s'\n", $file); + } + next if `file $file` =~ m[shell\s+script]; # silently ignore shell scripts @@ -190,6 +203,8 @@ Sets the root folder that is used when searching for libraries. In order to collect the loader-settings, etc/ld.so.conf is read relative to this path and all libraries are sought relative to this path, too (a.k.a. a virtual chroot). +Defaults to '/'. + =item B<--version> Prints the version and exits. -- cgit v1.2.3-55-g7522