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>
Basic systemd functionality is in 00systemd now.
Switching root and the initrd.target is in 00systemd-initrd.
Dracut additions to the systemd initrd are in 98dracut-systemd.
Currently the default action is emergency_shell when failure happened
during system boot. In kdump, this default may not be expected. E.g,
if dump target is not rootfs, it does not matter if mount root failed.
Adding an action which allow dracut always go ahead though failure
happens is needed by kdump.
So here add a function action_on_fail() and cmdline parameter
action_on_fail=<shell | continue>. Use action_to_fail() to replace
emergency_shell which was called after failure. By $(getarg action_on_fail=),
decide to drop into shell, or to leave away the failure and go ahead.
v3->v4:
add handling of selinux policy loaded failure, and change code format to
be consitent
Signed-off-by: Baoquan He <bhe@redhat.com>
[Edited by harald@redhat.com]