dracut-031-4.git20130731
- remove action_on_fail kernel command line parameter
This commit is contained in:
parent
650a106cbf
commit
ac117f2dab
102
0003-Change-the-implementation-of-action_on_fail.patch
Normal file
102
0003-Change-the-implementation-of-action_on_fail.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From d2765b5175663d094737d6819cc3f3df53e7a4cb Mon Sep 17 00:00:00 2001
|
||||
From: Baoquan He <bhe@redhat.com>
|
||||
Date: Tue, 23 Jul 2013 18:16:00 +0800
|
||||
Subject: [PATCH] Change the implementation of action_on_fail
|
||||
|
||||
Currently when action_on_fail is enabled, the emergency_shell won't be called.
|
||||
In kdump even though user specify the default action as emergency_shell,
|
||||
dracut skip it. Now change the implementation of action_on_fail to depend
|
||||
on a file which is created by kdump when making kdump initrd, then remove it
|
||||
at the beginning of kdump. This can solve the explicit emergency_shell problem.
|
||||
|
||||
And action_on_fail won't need paramenters, remove the relevant description in
|
||||
dracut man page.
|
||||
|
||||
Signed-off-by: Baoquan He <bhe@redhat.com>
|
||||
---
|
||||
dracut.cmdline.7.asc | 4 ----
|
||||
modules.d/98systemd/dracut-emergency.service | 2 +-
|
||||
modules.d/98systemd/emergency.service | 2 +-
|
||||
modules.d/99base/dracut-lib.sh | 28 ++++++++++------------------
|
||||
4 files changed, 12 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
||||
index cf11d50..09c47e8 100644
|
||||
--- a/dracut.cmdline.7.asc
|
||||
+++ b/dracut.cmdline.7.asc
|
||||
@@ -121,10 +121,6 @@ Misc
|
||||
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
|
||||
~~~~~
|
||||
diff --git a/modules.d/98systemd/dracut-emergency.service b/modules.d/98systemd/dracut-emergency.service
|
||||
index a4b81bc..5a6d525 100644
|
||||
--- a/modules.d/98systemd/dracut-emergency.service
|
||||
+++ b/modules.d/98systemd/dracut-emergency.service
|
||||
@@ -13,7 +13,7 @@ DefaultDependencies=no
|
||||
After=systemd-vconsole-setup.service
|
||||
Wants=systemd-vconsole-setup.service
|
||||
Conflicts=emergency.service emergency.target
|
||||
-ConditionKernelCommandLine=!action_on_fail=continue
|
||||
+ConditionPathExists=!/lib/dracut/no-emergency-shell
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/
|
||||
diff --git a/modules.d/98systemd/emergency.service b/modules.d/98systemd/emergency.service
|
||||
index c19fe37..5f1eaa2 100644
|
||||
--- a/modules.d/98systemd/emergency.service
|
||||
+++ b/modules.d/98systemd/emergency.service
|
||||
@@ -12,7 +12,7 @@ Description=Emergency Shell
|
||||
DefaultDependencies=no
|
||||
After=systemd-vconsole-setup.service
|
||||
Wants=systemd-vconsole-setup.service
|
||||
-ConditionKernelCommandLine=!action_on_fail=continue
|
||||
+ConditionPathExists=!/lib/dracut/no-emergency-shell
|
||||
|
||||
[Service]
|
||||
Environment=HOME=/
|
||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
||||
index 9e49a9c..248cc8e 100755
|
||||
--- a/modules.d/99base/dracut-lib.sh
|
||||
+++ b/modules.d/99base/dracut-lib.sh
|
||||
@@ -1030,24 +1030,16 @@ emergency_shell()
|
||||
|
||||
action_on_fail()
|
||||
{
|
||||
- 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
|
||||
+ 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
|
||||
}
|
||||
|
||||
# Retain the values of these variables but ensure that they are unexported
|
@ -10,7 +10,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 031
|
||||
Release: 3.git20130731%{?dist}
|
||||
Release: 4.git20130731%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
@ -31,6 +31,7 @@ URL: https://dracut.wiki.kernel.org/
|
||||
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.bz2
|
||||
Patch1: 0001-Generate-correct-ifcfg-file-for-vlan-option.patch
|
||||
Patch2: 0002-Revert-base-setup-correct-system-time-and-time-zone-.patch
|
||||
Patch3: 0003-Change-the-implementation-of-action_on_fail.patch
|
||||
|
||||
|
||||
BuildRequires: bash git
|
||||
@ -446,6 +447,9 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-4.git20130731
|
||||
- remove action_on_fail kernel command line parameter
|
||||
|
||||
* Wed Jul 31 2013 Harald Hoyer <harald@redhat.com> 031-3.git20130731
|
||||
- do not include adjtime and localtime in the initramfs
|
||||
- write out vlan configs
|
||||
|
Loading…
Reference in New Issue
Block a user