Blame SOURCES/0196-dracut-functions.sh-speed-up-ldconfig_paths.patch

712866
From 8bf70609de708380c1184bb27a561f6f253650b6 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Tue, 8 Jul 2014 12:54:21 +0200
712866
Subject: [PATCH] dracut-functions.sh: speed up ldconfig_paths()
712866
712866
(cherry picked from commit 5ea0be0a8c83969fd0041b3e647f82fcfb365e44)
712866
---
712866
 dracut-functions.sh | 7 +++----
712866
 1 file changed, 3 insertions(+), 4 deletions(-)
712866
712866
diff --git a/dracut-functions.sh b/dracut-functions.sh
5c6c2a
index 915f70fa..00025567 100755
712866
--- a/dracut-functions.sh
712866
+++ b/dracut-functions.sh
712866
@@ -60,12 +60,11 @@ ldconfig_paths()
712866
     local a i
712866
     declare -A a
712866
     for i in $(
712866
-        ldconfig -pN 2>/dev/null | while read a b c d; do
712866
-            [[ "$c" != "=>" ]] && continue
712866
-            printf "%s\n" ${d%/*};
712866
+        ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do
712866
+            d=${d%/*}
712866
+            printf "%s\n" "$d";
712866
         done
712866
     ); do
712866
-        [[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue
712866
         a["$i"]=1;
712866
     done;
712866
     printf "%s\n" ${!a[@]}