dracut-functions.sh: only call ldd in find_binary() for "*.so*"
authorHarald Hoyer <harald@redhat.com>
Fri, 24 Feb 2012 10:47:17 +0000 (11:47 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 24 Feb 2012 13:59:18 +0000 (14:59 +0100)
dracut-functions.sh

index e20f81e048cd4a381764aa89a4117582f42b3881..a5640d681cf5f6858da452235b90fa0c50581f57 100755 (executable)
@@ -470,7 +470,7 @@ inst_library() {
 # search in the usual places to find the binary.
 find_binary() {
     if [[ -z ${1##/*} ]]; then
-        if [[ -x $1 ]] || ldd $1 &>/dev/null; then
+        if [[ -x $1 ]] || { strstr "$1" ".so" && ldd $1 &>/dev/null; };  then
             echo $1
             return 0
         fi