]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
usable_root(): only check for ld-*.so
authorHarald Hoyer <harald@redhat.com>
Tue, 24 Jun 2014 16:54:35 +0000 (18:54 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 10:01:33 +0000 (12:01 +0200)
current systemd allows booting with only /usr on the root partition

see, if we can find an elf loader

(cherry picked from commit 7e59d550425833e9ecaa892ef9f1a9fe8160065a)

modules.d/99base/dracut-lib.sh

index 66977e7337f1aa9402ef847c616ba76314d18e71..417cfd8ef4291a4531a869b3af42bf8367963869 100755 (executable)
@@ -730,11 +730,18 @@ $(readlink -e -q "$d")" || return 255
 
 
 usable_root() {
-    local _d
-    [ -d $1 ] || return 1
-    for _d in proc sys dev; do
-        [ -e "$1"/$_d ] || return 1
+    local _i
+
+    [ -d "$1" ] || return 1
+
+    for _i in "$1"/usr/lib*/ld-*.so "$1"/lib*/ld-*.so; do
+        [ -e "$_i" ] && return 0
     done
+
+    for _i in proc sys dev; do
+        [ -e "$1"/$_i ] || return 1
+    done
+
     return 0
 }