base/init: fix init executable check

master
Harald Hoyer 2010-11-19 13:40:34 +01:00
parent 770b796e52
commit 7f7a91b75f
1 changed files with 4 additions and 1 deletions

View File

@ -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" ] || {