summaryrefslogtreecommitdiffstats
path: root/config-db/slxldd
diff options
context:
space:
mode:
authorOliver Tappe2006-10-29 11:43:41 +0100
committerOliver Tappe2006-10-29 11:43:41 +0100
commit697c0e519ad31cfc29d750a5743dddb24023c588 (patch)
tree24f661526a08a9c9b6c5a4fe307d4a42bc83f8aa /config-db/slxldd
parent* adjusted PODs and abstracts to recent name changes. (diff)
downloadcore-697c0e519ad31cfc29d750a5743dddb24023c588.tar.gz
core-697c0e519ad31cfc29d750a5743dddb24023c588.tar.xz
core-697c0e519ad31cfc29d750a5743dddb24023c588.zip
* --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
Diffstat (limited to 'config-db/slxldd')
-rwxr-xr-xconfig-db/slxldd17
1 files changed, 16 insertions, 1 deletions
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.