]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
modules.d/99base/init.sh: check for a valid init in case INIT is a symlink.
authorJuan RP <xtraeme@gmail.com>
Mon, 28 May 2012 14:14:35 +0000 (16:14 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 May 2012 07:15:34 +0000 (09:15 +0200)
Obviously we have to test if it's executable with the PATH to NEWROOT.

modules.d/99base/init.sh

index b8736ecb69afe441ae4045fdfc647b17bcae7b36..b20abc4df836623faa8c23848052ebfb0e840210 100755 (executable)
@@ -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