Commit Graph

2 Commits

Author SHA1 Message Date
Kairui Song
02202aa70f logger: source the logger file individually
Sourcing logger file in kdump-lib.sh will leak kdump helper to dracut,
because module-setup.sh will source kdump-lib.sh. This will make kdump's
function override dracut's ones, and lead to unexpected behaviours.

So include kdump-logger.sh individually and only source it where it really
needed. for module-setup.sh, simply use dracut's logger helper is good
enough so just source kdump-logger.sh in kdump only scripts.

Signed-off-by: Kairui Song <kasong@redhat.com>
Acked-by: Lianbo Jiang <lijiang@redhat.com>
2021-01-20 14:13:44 +08:00
WANG Chao
ed12e00218 kdump-dep-generator: Add kdump service dependencies on the fly
kdump-dep-generator is a systemd generator, used to write out kdump
service dependencies.

Currently it's only useful for ssh dump case. And in ssh dump case, it
writes out a dependency which kdump.service "Wants"
network-online.target:

  # ls -l /run/systemd/generator/kdump.service.wants/
  [..] network-online.target -> /usr/lib/systemd/system/network-online.target

So that kdump.service will pull in network-online.target and delayed
start until network-online.target is reached.

In the future, we could use generator to write out kdump.service
dynamically and get rid of the static defined kdump.service at all.

v1->v2:
Vivek: not using hardcoded run time generator path, use what systemd pass in.

Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
2014-04-17 11:27:31 +08:00