dracut-functions.sh: speed up ldconfig_paths()
parent
4adeefc4ab
commit
5ea0be0a8c
|
|
@ -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[@]}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue