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

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