]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/init: fix init executable check
authorHarald Hoyer <harald@redhat.com>
Fri, 19 Nov 2010 12:40:34 +0000 (13:40 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 19 Nov 2010 12:40:34 +0000 (13:40 +0100)
modules.d/99base/init

index 6557cf4f8fd6c49f26954b9487ac052e001fdac3..22cb39a8fbebc30b0ef61bac612de45108c67949 100755 (executable)
@@ -253,7 +253,10 @@ source_all pre-pivot
 # Try to find init.
 for i in "$(getarg real_init=)" "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do
     [ -n "$i" ] || continue
-    [ -d "$NEWROOT$i" ] || [ -L "$NEWROOT$i" -o -x "$NEWROOT$i" ] && { INIT="$i"; break; }
+    if ! [ -d "$NEWROOT$i" ] && [ -L "$NEWROOT$i" -o -x "$NEWROOT$i" ]; then
+        INIT="$i"
+        break
+    fi
 done
 
 [ "$INIT" ] || {