specify the controlling terminal for the console.
This is useful, if you have multiple "console=" arguments.
+**rd.action_on_fail=**_{shell|continue}_::
+ Specify the action after failure. By default it's emergency_shell.
+ 'continue' means: ignore the current failure and go ahead.
+
[[dracutkerneldebug]]
Debug
~~~~~
After=systemd-vconsole-setup.service
Wants=systemd-vconsole-setup.service
Conflicts=emergency.service emergency.target
-ConditionPathExists=!/lib/dracut/no-emergency-shell
+ConditionKernelCommandLine=!action_on_fail=continue
[Service]
Environment=HOME=/
DefaultDependencies=no
After=systemd-vconsole-setup.service
Wants=systemd-vconsole-setup.service
-ConditionPathExists=!/lib/dracut/no-emergency-shell
+ConditionKernelCommandLine=!action_on_fail=continue
[Service]
Environment=HOME=/
action_on_fail()
{
- if [ -f "$initdir/lib/dracut/no-emergency-shell" ]; then
- [ "$1" = "-n" ] && shift 2
- [ "$1" = "--shutdown" ] && shift 2
- warn "$*"
- warn "Not dropping to emergency shell, because $initdir/lib/dracut/no-emergency-shell exists."
- return 0
- fi
-
- emergency_shell $@
- return 1
+ local _action=$(getarg rd.action_on_fail= -d action_on_fail=)
+ case "$_action" in
+ continue)
+ [ "$1" = "-n" ] && shift 2
+ [ "$1" = "--shutdown" ] && shift 2
+ warn "$*"
+ warn "Not dropping to emergency shell, because 'action_on_fail=continue' was set on the kernel command line."
+ return 0
+ ;;
+ shell)
+ emergency_shell $@
+ return 1
+ ;;
+ *)
+ emergency_shell $@
+ return 1
+ ;;
+ esac
}
# Retain the values of these variables but ensure that they are unexported