From: Harald Hoyer Date: Tue, 24 Jun 2014 16:54:35 +0000 (+0200) Subject: usable_root(): only check for ld-*.so X-Git-Tag: 038~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e59d550425833e9ecaa892ef9f1a9fe8160065a;p=thirdparty%2Fdracut.git usable_root(): only check for ld-*.so current systemd allows booting with only /usr on the root partition see, if we can find an elf loader --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index ed40b822f..a77b84337 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -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 }