dracut: do not install ld.so.conf* for kernel-only
authorHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 12:38:31 +0000 (14:38 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 11 Apr 2011 17:24:59 +0000 (19:24 +0200)
dracut

diff --git a/dracut b/dracut
index 15a5ee5..92fb40a 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -523,15 +523,18 @@ while pop install_items items; do
 done
 unset item
 
-# make sure that library links are correct and up to date
-for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
-    [[ -e $f ]] && dracut_install "$f"
-done
-if ! ldconfig -r "$initdir"; then
-    if [[ $UID = 0 ]]; then
-        derror "ldconfig exited ungracefully"
-    else
-        derror "ldconfig might need uid=0 (root) for chroot()"
+
+if [[ $kernel_only != yes ]]; then
+    # make sure that library links are correct and up to date
+    for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
+        [[ -e $f ]] && dracut_install "$f"
+    done
+    if ! ldconfig -r "$initdir"; then
+        if [[ $UID = 0 ]]; then
+            derror "ldconfig exited ungracefully"
+        else
+            derror "ldconfig might need uid=0 (root) for chroot()"
+        fi
     fi
 fi