From: Juan RP Date: Mon, 28 May 2012 14:14:35 +0000 (+0200) Subject: modules.d/99base/init.sh: check for a valid init in case INIT is a symlink. X-Git-Tag: 019~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfede42fc37b9d22c07a753fb5d5a1797a1ffa1d;p=thirdparty%2Fdracut.git modules.d/99base/init.sh: check for a valid init in case INIT is a symlink. Obviously we have to test if it's executable with the PATH to NEWROOT. --- diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh index b8736ecb6..b20abc4df 100755 --- a/modules.d/99base/init.sh +++ b/modules.d/99base/init.sh @@ -237,7 +237,7 @@ for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbi [ -n "$i" ] || continue __p=$(readlink -f "${NEWROOT}/${i}") - if [ -x "$__p" ]; then + if [ -x "$__p" -o -x "${NEWROOT}/${__p}" ]; then INIT="$i" break fi