File 0301-systemd_initqueue_continue_waiting_if_any_timeout_script_makes_progress.patch of Package dracut.892

From: NeilBrown <neilb@suse.de>
Subject: systemd/dracut-iniqueue - continue waiting if any timeout script makes progress
References: bnc#932735
Patch-Mainline: 
Git-commit: 97cb17c792fd7fd65444a93e58970052ff812768
Git-repo: git.kernel.org/pub/scm/boot/dracut/dracut.git

Signed-off-by: Thomas Renninger <trenn@suse.de>

A number of timeout scripts can be registered.  If any one of them
makes progress - e.g. assembles a degraded md array - then
the main loop should wait a bit longer rather than pressing forward.

This is particularly important is resume-from-hibernate requires a
degraded md array.  Both the script to forcibly assemble the md array
and the script to abort hibernation if the device doesn't appear
are 'timeout' scripts.  There needs to be a reasonable delay between
these running.

So: if any script has indicated that progress was made, break of out
the loop and go back to normal waiting.

Signed-off-by: NeilBrown <neilb@suse.de>

Index: dracut-037/modules.d/98systemd/dracut-initqueue.sh
===================================================================
--- dracut-037.orig/modules.d/98systemd/dracut-initqueue.sh	2014-03-19 17:16:08.000000000 +0100
+++ dracut-037/modules.d/98systemd/dracut-initqueue.sh	2015-06-03 18:18:56.193582052 +0200
@@ -62,6 +62,7 @@
             job=$job . $job
             udevadm settle --timeout=0 >/dev/null 2>&1 || main_loop=0
             [ -f $hookdir/initqueue/work ] && main_loop=0
+            [ $main_loop -eq 0 ] && break
         done
     fi