# wait for loginit
i=0
while [ $i -lt 10 ]; do
- j=$(jobs)
- [ -z "$j" ] && break
- [ -z "${j##*Running*}" ] || break
+ if [ -e /run/initramfs/init.log.end ]; then
+ j=$(jobs)
+ [ -z "$j" ] && break
+ [ -z "${j##*Running*}" ] || break
+ fi
sleep 0.1
i=$(($i+1))
done
done
set -x
fi
- rm -f /run/initramfs/initlog.pipe
+ rm -f /run/initramfs/initlog.pipe /run/initramfs/init.log.end
}
emergency_shell()
exec 6>/init.log
while read line; do
- [ "$line" = "DRACUT_LOG_END" ] && exit 0
+ if [ "$line" = "DRACUT_LOG_END" ]; then
+ > /run/initramfs/init.log.end
+ exit 0
+ fi
echo "<7>dracut: $line" >&5
# if "quiet" is specified we output to /dev/console
[ -n "$QUIET" ] && echo "dracut: $line"