Skip to content

Commit 298bf1c

Browse files
committed
dracut: Do not include module by default when building kdump initrd
Related to coreos/fedora-coreos-tracker#1832
1 parent 90b2789 commit 298bf1c

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

overlay.d/05rhcos/usr/lib/dracut/modules.d/10ignition-godebug/module-setup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
33
# ex: ts=8 sw=4 sts=4 et filetype=sh
44

5+
check() {
6+
# If we are in a kdump environment return 255, so this module is only
7+
# included if some other module depends on it
8+
# See: https://github.com/coreos/fedora-coreos-tracker/issues/1832
9+
#
10+
# This module requires integration with the rest of the initramfs, so don't include it by default.
11+
if [[ $IN_KDUMP == 1 ]]; then
12+
return 255
13+
fi
14+
}
15+
516
depends() {
617
echo systemd
718
}

overlay.d/05rhcos/usr/lib/dracut/modules.d/30rhcos-afterburn-checkin/module-setup.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@
88
# even though things are. Kube will do the actual health handling
99
# for the machine.
1010

11-
depends() {
12-
echo network systemd
11+
check() {
12+
# If we are in a kdump environment return 255, so this module is only
13+
# included if some other module depends on it
14+
# See: https://github.com/coreos/fedora-coreos-tracker/issues/1832
15+
#
16+
# This module requires integration with the rest of the initramfs, so don't include it by default.
17+
if [[ $IN_KDUMP == 1 ]]; then
18+
return 255
19+
fi
1320
}
1421

15-
check() {
16-
return 0
22+
depends() {
23+
echo network systemd
1724
}
1825

1926
install() {

overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/module-setup.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/bin/bash
22

33
check() {
4-
return 0
4+
# If we are in a kdump environment return 255, so this module is only
5+
# included if some other module depends on it
6+
# See: https://github.com/coreos/fedora-coreos-tracker/issues/1832
7+
#
8+
# This module requires integration with the rest of the initramfs, so don't include it by default.
9+
if [[ $IN_KDUMP == 1 ]]; then
10+
return 255
11+
fi
512
}
613

714
depends() {

overlay.d/05rhcos/usr/lib/dracut/modules.d/41rhcos-check-luks-syntax/module-setup.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/bash
22

3+
check() {
4+
# If we are in a kdump environment return 255, so this module is only
5+
# included if some other module depends on it
6+
# See: https://github.com/coreos/fedora-coreos-tracker/issues/1832
7+
#
8+
# This module requires integration with the rest of the initramfs, so don't include it by default.
9+
if [[ $IN_KDUMP == 1 ]]; then
10+
return 255
11+
fi
12+
}
13+
314
install_unit() {
415
local unit="$1"; shift
516
local target="${1:-ignition-complete.target}"; shift

0 commit comments

Comments
 (0)