Blame SOURCES/0186-usable_root-only-check-for-ld-.so.patch

712866
From 49fe9bc014993d1dd4a7f26e1904d7359398a6dd Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Tue, 24 Jun 2014 18:54:35 +0200
712866
Subject: [PATCH] usable_root(): only check for ld-*.so
712866
712866
current systemd allows booting with only /usr on the root partition
712866
712866
see, if we can find an elf loader
712866
712866
(cherry picked from commit 7e59d550425833e9ecaa892ef9f1a9fe8160065a)
712866
---
712866
 modules.d/99base/dracut-lib.sh | 15 +++++++++++----
712866
 1 file changed, 11 insertions(+), 4 deletions(-)
712866
712866
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
5c6c2a
index 66977e73..417cfd8e 100755
712866
--- a/modules.d/99base/dracut-lib.sh
712866
+++ b/modules.d/99base/dracut-lib.sh
712866
@@ -730,11 +730,18 @@ $(readlink -e -q "$d")" || return 255
712866
 
712866
 
712866
 usable_root() {
712866
-    local _d
712866
-    [ -d $1 ] || return 1
712866
-    for _d in proc sys dev; do
712866
-        [ -e "$1"/$_d ] || return 1
712866
+    local _i
712866
+
712866
+    [ -d "$1" ] || return 1
712866
+
712866
+    for _i in "$1"/usr/lib*/ld-*.so "$1"/lib*/ld-*.so; do
712866
+        [ -e "$_i" ] && return 0
712866
     done
712866
+
712866
+    for _i in proc sys dev; do
712866
+        [ -e "$1"/$_i ] || return 1
712866
+    done
712866
+
712866
     return 0
712866
 }
712866