On 05/11/15 at 04:40am, Chao Fan wrote:
Takeshi Nishimura fonud a bug, that vmcore is not created if panic occurs during
shutdown.
We find when shutdown, the kdump will stopped by systemd and then kdump will not work if
kernel crash.
In RHEL-6,kdump will not be stopped when shutdown, but it will be in RHEL-7.
I change the file of kdump.service and add "DefaultDependencies=no" to the
[Unit] of kdump.service to make kdump not stopped by systemd after shutdown
command.
The manpage of systemd.unit about the DefaultDependencies:Takes a boolean ar
Why the word is splited across lines?
gument. If true, (the default), a few default dependencies will
implicitly b
e created for the unit. The actual dependencies created depend on the unit ty
pe. For example, for service units, these dependencies ensure that the ser
vice is started only after basic system initialization is completed and is pro
perly terminated on system shutdown. See the respective man pages for details
. Generally, only services involved with early boot or late shutdown should s
et this option to false. It is highly recommended to leave this option enabl
ed for the majority of common units. If set to false, this option does not d
isable all implicit dependencies, just non-essential ones.
The mail to the
systemd:http://lists.freedesktop.org/archives/systemd-devel/2015-April/03...
And follow the suggestion of systemd, add "basic.target" to "After="
to mak
e kdump can run auto when power on.
Signed-off-by: Chao Fan <cfan(a)redhat.com>
---
kdump.service | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kdump.service b/kdump.service
index 24c1386..5144597 100644
--- a/kdump.service
+++ b/kdump.service
@@ -1,6 +1,7 @@
[Unit]
Description=Crash recovery kernel arming
-After=network.target network-online.target remote-fs.target
+After=network.target network-online.target remote-fs.target basic.target
+DefaultDependencies=no
[Service]
Type=oneshot
--
2.1.0
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec