|
|
712866 |
From 03bf7758aa08e6533f438b4a60b4d5bd1847b1cd Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Colin Guthrie <colin@mageia.org>
|
|
|
712866 |
Date: Sat, 2 Nov 2013 11:26:30 +0000
|
|
|
712866 |
Subject: [PATCH] dracut-functions.sh: Avoid loading unnecessary 32-bit
|
|
|
712866 |
libraries for 64-bit initrds
|
|
|
712866 |
|
|
|
712866 |
Due to the 'inst_libdir_file "libnss_files*"' in the udev-rules module
|
|
|
712866 |
this caues the /usr/lib/libnss_files-2.18.so* to be included. This is a
|
|
|
712866 |
32-bit library and pulls in a 32-bit version of glibc also even on a
|
|
|
712866 |
64-bit system.
|
|
|
712866 |
|
|
|
712866 |
This is due to the fact that ldconfig -pN will print [/usr]/lib paths
|
|
|
712866 |
from the cache as well as [/usr]/lib64. As we handle these paths
|
|
|
712866 |
specifically we should ignore these results from the cache.
|
|
|
712866 |
|
|
|
712866 |
Also there was a missing space when appending the ldconfig paths
|
|
|
712866 |
onto our list meaning the last builtin and first ldconfig path
|
|
|
712866 |
were unusable.
|
|
|
712866 |
---
|
|
|
712866 |
dracut-functions.sh | 3 ++-
|
|
|
712866 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
|
5c6c2a |
index 38095ba4..2872516a 100755
|
|
|
712866 |
--- a/dracut-functions.sh
|
|
|
712866 |
+++ b/dracut-functions.sh
|
|
|
712866 |
@@ -65,6 +65,7 @@ ldconfig_paths()
|
|
|
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[@]}
|
|
|
712866 |
@@ -81,7 +82,7 @@ if ! [[ $libdirs ]] ; then
|
|
|
712866 |
[[ -d /usr/lib ]] && libdirs+=" /usr/lib"
|
|
|
712866 |
fi
|
|
|
712866 |
|
|
|
712866 |
- libdirs+="$(ldconfig_paths)"
|
|
|
712866 |
+ libdirs+=" $(ldconfig_paths)"
|
|
|
712866 |
|
|
|
712866 |
export libdirs
|
|
|
712866 |
fi
|