From: NeilBrown Date: Thu, 26 Mar 2015 04:41:47 +0000 (+1100) Subject: systemd/dracut-iniqueue - continue waiting if any timeout script makes progress X-Git-Tag: 042~15^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97cb17c792fd7fd65444a93e58970052ff812768;p=thirdparty%2Fdracut.git systemd/dracut-iniqueue - continue waiting if any timeout script makes progress 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 --- diff --git a/modules.d/98dracut-systemd/dracut-initqueue.sh b/modules.d/98dracut-systemd/dracut-initqueue.sh index 88cd1e056..af9cec2c5 100755 --- a/modules.d/98dracut-systemd/dracut-initqueue.sh +++ b/modules.d/98dracut-systemd/dracut-initqueue.sh @@ -60,6 +60,7 @@ while :; do 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