]> 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>
Mon, 30 Jun 2014 10:03:11 +0000 (12:03 +0200)
current systemd allows booting with only /usr on the root partition

see, if we can find an elf loader

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

index ed40b822f2ee03346ff4aaef905f42babd712467..a77b843377c59f7310925dc10e220b2bd4f165e1 100755 (executable)
@@ -751,11 +751,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
 }