Blame 0005-dracut-functions-handle-shared-objects-in-find_binar.patch
|
Harald Hoyer |
0260fa |
From 81c6e7fb69a0b7ef5169d13f8b4a4025db923ead Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
0260fa |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
0260fa |
Date: Thu, 17 Feb 2011 10:48:35 +0100
|
|
Harald Hoyer |
0260fa |
Subject: [PATCH] dracut-functions: handle shared objects in find_binary w/o the exec flag
|
|
Harald Hoyer |
0260fa |
|
|
Harald Hoyer |
0260fa |
---
|
|
Harald Hoyer |
0260fa |
dracut-functions | 7 ++++++-
|
|
Harald Hoyer |
0260fa |
1 files changed, 6 insertions(+), 1 deletions(-)
|
|
Harald Hoyer |
0260fa |
|
|
Harald Hoyer |
0260fa |
diff --git a/dracut-functions b/dracut-functions
|
|
Harald Hoyer |
0260fa |
index eef8f1e..ebcb7d8 100755
|
|
Harald Hoyer |
0260fa |
--- a/dracut-functions
|
|
Harald Hoyer |
0260fa |
+++ b/dracut-functions
|
|
Harald Hoyer |
0260fa |
@@ -320,7 +320,12 @@ inst_library() {
|
|
Harald Hoyer |
0260fa |
# search in the usual places to find the binary.
|
|
Harald Hoyer |
0260fa |
find_binary() {
|
|
Harald Hoyer |
0260fa |
local binpath="/bin /sbin /usr/bin /usr/sbin" p
|
|
Harald Hoyer |
0260fa |
- [[ -z ${1##/*} && -x $1 ]] && { echo $1; return 0; }
|
|
Harald Hoyer |
0260fa |
+ if [[ -z ${1##/*} ]]; then
|
|
Harald Hoyer |
0260fa |
+ if [[ -x $1 ]] || ldd $1 &>/dev/null; then
|
|
Harald Hoyer |
0260fa |
+ echo $1
|
|
Harald Hoyer |
0260fa |
+ return 0
|
|
Harald Hoyer |
0260fa |
+ fi
|
|
Harald Hoyer |
0260fa |
+ fi
|
|
Harald Hoyer |
0260fa |
for p in $binpath; do
|
|
Harald Hoyer |
0260fa |
[[ -x $p/$1 ]] && { echo "$p/$1"; return 0; }
|
|
Harald Hoyer |
0260fa |
done
|