dracut-functions.sh: speed up ldconfig_paths()

master
Harald Hoyer 2014-07-08 12:54:21 +02:00
parent 4adeefc4ab
commit 5ea0be0a8c
1 changed files with 3 additions and 4 deletions

View File

@ -109,12 +109,11 @@ ldconfig_paths()
local a i local a i
declare -A a declare -A a
for i in $( for i in $(
ldconfig -pN 2>/dev/null | while read a b c d; do ldconfig -pN 2>/dev/null | grep -F '=>' | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | while read a b c d; do
[[ "$c" != "=>" ]] && continue d=${d%/*}
printf "%s\n" ${d%/*}; printf "%s\n" "$d";
done done
); do ); do
[[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue
a["$i"]=1; a["$i"]=1;
done; done;
printf "%s\n" ${!a[@]} printf "%s\n" ${!a[@]}