Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
62ab5e53c734ad6ec77ebf0580383e8b6de96d16 SOURCES/dracut-049.tar.xz
|
|
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/dracut-049.tar.xz
|
/*.tar.*
|
||||||
|
238
0001-revert-fix-install.d-correctly-install-pre-genned-im.patch
Normal file
238
0001-revert-fix-install.d-correctly-install-pre-genned-im.patch
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
From 07151e560561b415f7e016362ab1d180b13f33fb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Wed, 12 Jun 2024 06:30:42 +0200
|
||||||
|
Subject: [PATCH 01/13] revert: "fix(install.d): correctly install pre-genned
|
||||||
|
image and die if no args"
|
||||||
|
|
||||||
|
revert: "fix(install.d): simplify and use what kernel-install gives us"
|
||||||
|
|
||||||
|
This reverts commits:
|
||||||
|
d40155385d060f8d8608fa8a4931e2e42ddc3a8f
|
||||||
|
8388ad149c698c951089606352fdb0cdcaaf40c9
|
||||||
|
|
||||||
|
https://github.com/dracut-ng/dracut-ng/issues/334
|
||||||
|
|
||||||
|
This is temporary, until the `20-grub.install` will be able to handle initrd
|
||||||
|
from kernel staging area.
|
||||||
|
---
|
||||||
|
install.d/50-dracut.install | 152 ++++++++++++++++++-----------
|
||||||
|
install.d/51-dracut-rescue.install | 22 +----
|
||||||
|
2 files changed, 97 insertions(+), 77 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
|
||||||
|
index 14f87721..441414ac 100755
|
||||||
|
--- a/install.d/50-dracut.install
|
||||||
|
+++ b/install.d/50-dracut.install
|
||||||
|
@@ -1,13 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
-COMMAND="${1:?}"
|
||||||
|
-KERNEL_VERSION="${2:?}"
|
||||||
|
-#shellcheck disable=SC2034
|
||||||
|
+COMMAND="$1"
|
||||||
|
+KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="$3"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
-# If the initrd was provided on the kernel command line, we shouldn't generate our own.
|
||||||
|
-if [[ "$COMMAND" != "add" || "$#" -gt 4 ]]; then
|
||||||
|
+# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
|
||||||
|
+# So, let's skip to create initrd.
|
||||||
|
+if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
@@ -16,64 +16,102 @@ if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" = "dracut" ]]; then
|
||||||
|
- # We are the initrd generator
|
||||||
|
- IMAGE="initrd"
|
||||||
|
- UEFI_OPTS="--no-uefi"
|
||||||
|
+# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
|
||||||
|
+if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
|
||||||
|
+ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
|
||||||
|
+ if [[ -z $KERNEL_INSTALL_UKI_GENERATOR || $KERNEL_INSTALL_UKI_GENERATOR == "dracut" ]]; then
|
||||||
|
+ # No uki generator preference set or we have been chosen
|
||||||
|
+ IMAGE="uki.efi"
|
||||||
|
+ UEFI_OPTS="--uefi"
|
||||||
|
+ elif [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then
|
||||||
|
+ # We aren't the uki generator, but we have been requested to make the initrd
|
||||||
|
+ IMAGE="initrd"
|
||||||
|
+ UEFI_OPTS="--no-uefi"
|
||||||
|
+ else
|
||||||
|
+ exit 0
|
||||||
|
+ fi
|
||||||
|
+elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
|
||||||
|
+ BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
|
||||||
|
+ if [[ -z $KERNEL_INSTALL_INITRD_GENERATOR || $KERNEL_INSTALL_INITRD_GENERATOR == "dracut" ]]; then
|
||||||
|
+ IMAGE="initrd"
|
||||||
|
+ UEFI_OPTS="--no-uefi"
|
||||||
|
+ else
|
||||||
|
+ exit 0
|
||||||
|
+ fi
|
||||||
|
else
|
||||||
|
- exit 0
|
||||||
|
+ # No layout information, use users --uefi/--no-uefi preference
|
||||||
|
+ UEFI_OPTS=""
|
||||||
|
+ if [[ -d $BOOT_DIR_ABS ]]; then
|
||||||
|
+ IMAGE="initrd"
|
||||||
|
+ else
|
||||||
|
+ BOOT_DIR_ABS="/boot"
|
||||||
|
+ IMAGE="initramfs-${KERNEL_VERSION}.img"
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then
|
||||||
|
- # We are chosen to generate the UKI as well as initrd
|
||||||
|
- IMAGE="uki.efi"
|
||||||
|
- UEFI_OPTS="--uefi"
|
||||||
|
-fi
|
||||||
|
+ret=0
|
||||||
|
|
||||||
|
-if [[ -f ${KERNEL_IMAGE%/*}/$IMAGE ]]; then
|
||||||
|
- # we found an initrd or uki.efi at the same place as the kernel
|
||||||
|
- # use this and don't generate a new one
|
||||||
|
- [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \
|
||||||
|
- "There is an $IMAGE image at the same place as the kernel, skipping generating a new one"
|
||||||
|
- cp --reflink=auto "${KERNEL_IMAGE%/*}/$IMAGE" "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \
|
||||||
|
- && chown root:root "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \
|
||||||
|
- && chmod 0600 "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" \
|
||||||
|
- && exit 0
|
||||||
|
-fi
|
||||||
|
+case "$COMMAND" in
|
||||||
|
+ add)
|
||||||
|
+ if [[ $IMAGE == "uki.efi" ]]; then
|
||||||
|
+ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi
|
||||||
|
+ else
|
||||||
|
+ IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
|
||||||
|
+ fi
|
||||||
|
+ if [[ -f ${IMAGE_PREGENERATED} ]]; then
|
||||||
|
+ # we found an initrd or uki.efi at the same place as the kernel
|
||||||
|
+ # use this and don't generate a new one
|
||||||
|
+ [[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \
|
||||||
|
+ "There is an ${IMAGE} image at the same place as the kernel, skipping generating a new one"
|
||||||
|
+ cp --reflink=auto "$IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$IMAGE" \
|
||||||
|
+ && chown root:root "$BOOT_DIR_ABS/$IMAGE" \
|
||||||
|
+ && chmod 0600 "$BOOT_DIR_ABS/$IMAGE" \
|
||||||
|
+ && exit 0
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
-if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then
|
||||||
|
- if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then
|
||||||
|
- read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline"
|
||||||
|
- fi
|
||||||
|
-elif [[ -f /etc/kernel/cmdline ]]; then
|
||||||
|
- read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||||
|
-elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||||
|
- read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||||
|
-else
|
||||||
|
- declare -a BOOT_OPTIONS
|
||||||
|
+ if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then
|
||||||
|
+ if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then
|
||||||
|
+ read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline"
|
||||||
|
+ fi
|
||||||
|
+ elif [[ -f /etc/kernel/cmdline ]]; then
|
||||||
|
+ read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||||
|
+ elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||||
|
+ read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||||
|
+ else
|
||||||
|
+ declare -a BOOT_OPTIONS
|
||||||
|
|
||||||
|
- read -r -d '' -a line < /proc/cmdline
|
||||||
|
- for i in "${line[@]}"; do
|
||||||
|
- [[ ${i#initrd=*} != "$i" ]] && continue
|
||||||
|
- BOOT_OPTIONS+=("$i")
|
||||||
|
- done
|
||||||
|
-fi
|
||||||
|
+ read -r -d '' -a line < /proc/cmdline
|
||||||
|
+ for i in "${line[@]}"; do
|
||||||
|
+ [[ ${i#initrd=*} != "$i" ]] && continue
|
||||||
|
+ BOOT_OPTIONS+=("$i")
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
|
||||||
|
-unset noimageifnotneeded
|
||||||
|
+ unset noimageifnotneeded
|
||||||
|
|
||||||
|
-for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
|
||||||
|
- # shellcheck disable=SC1001
|
||||||
|
- if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
|
||||||
|
- noimageifnotneeded="yes"
|
||||||
|
- break
|
||||||
|
- fi
|
||||||
|
-done
|
||||||
|
+ for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
|
||||||
|
+ # shellcheck disable=SC1001
|
||||||
|
+ if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
|
||||||
|
+ noimageifnotneeded="yes"
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+
|
||||||
|
+ # shellcheck disable=SC2046
|
||||||
|
+ dracut -f \
|
||||||
|
+ ${noimageifnotneeded:+--noimageifnotneeded} \
|
||||||
|
+ $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
|
||||||
|
+ $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \
|
||||||
|
+ "$UEFI_OPTS" \
|
||||||
|
+ --kver "$KERNEL_VERSION" \
|
||||||
|
+ "$BOOT_DIR_ABS/$IMAGE"
|
||||||
|
+ ret=$?
|
||||||
|
+ ;;
|
||||||
|
+
|
||||||
|
+ remove)
|
||||||
|
+ rm -f -- "$BOOT_DIR_ABS/$IMAGE"
|
||||||
|
+ ret=$?
|
||||||
|
+ ;;
|
||||||
|
+esac
|
||||||
|
|
||||||
|
-# shellcheck disable=SC2046
|
||||||
|
-dracut -f \
|
||||||
|
- ${noimageifnotneeded:+--noimageifnotneeded} \
|
||||||
|
- $([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
|
||||||
|
- $([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \
|
||||||
|
- "$UEFI_OPTS" \
|
||||||
|
- --kver "$KERNEL_VERSION" \
|
||||||
|
- "$KERNEL_INSTALL_STAGING_AREA/$IMAGE" || exit 1
|
||||||
|
+exit $ret
|
||||||
|
diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install
|
||||||
|
index 4ec9e3c5..9312e242 100755
|
||||||
|
--- a/install.d/51-dracut-rescue.install
|
||||||
|
+++ b/install.d/51-dracut-rescue.install
|
||||||
|
@@ -2,29 +2,11 @@
|
||||||
|
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
|
-COMMAND="${1:?}"
|
||||||
|
-KERNEL_VERSION="${2:?}"
|
||||||
|
+COMMAND="$1"
|
||||||
|
+KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="${3%/*}/0-rescue"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
-# If the initrd was provided on the kernel command line, we shouldn't generate our own.
|
||||||
|
-if [[ "$COMMAND" = "add" && "$#" -gt 4 ]]; then
|
||||||
|
- exit 0
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-# Do not attempt to create initramfs if the supplied image is already a UKI
|
||||||
|
-if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
|
||||||
|
- exit 0
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
-if [[ "$KERNEL_INSTALL_UKI_GENERATOR" = "dracut" ]]; then
|
||||||
|
- # Rescue images currently not compatible with UKIs
|
||||||
|
- exit 0
|
||||||
|
-elif [[ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]]; then
|
||||||
|
- # We are not the initrd generator
|
||||||
|
- exit 0
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
dropindirs_sort() {
|
||||||
|
suffix=$1
|
||||||
|
shift
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,72 @@
|
|||||||
|
From e8c6d93a1fe7ea255754bfb93fad8daad62a85ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||||
|
Date: Tue, 18 Jan 2022 18:08:42 +0100
|
||||||
|
Subject: [PATCH 02/13] feat(kernel-install): do nothing when
|
||||||
|
$KERNEL_INSTALL_INITRD_GENERATOR says so
|
||||||
|
|
||||||
|
dracut may be installed without being actually used. This is very common in
|
||||||
|
binary distros where a package may be pulled in through dependencies, even
|
||||||
|
though the user does not need it in a particular setup. KERNEL_INSTALL_INITRD_GENERATOR
|
||||||
|
is being added in systemd's kernel-install to select which of the possibly many
|
||||||
|
initrd generation mechanisms will be used.
|
||||||
|
|
||||||
|
For backwards compat, if it not set, continue as before. But if set to
|
||||||
|
something else, skip our kernel-install plugins.
|
||||||
|
|
||||||
|
(Cherry-picked commit f47bcdd7342ca0d46b889e712a1c7446e18434bc from PR#1825)
|
||||||
|
---
|
||||||
|
install.d/50-dracut.install | 9 ++++++++-
|
||||||
|
install.d/51-dracut-rescue.install | 6 ++++++
|
||||||
|
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
|
||||||
|
index 441414ac..3f961b11 100755
|
||||||
|
--- a/install.d/50-dracut.install
|
||||||
|
+++ b/install.d/50-dracut.install
|
||||||
|
@@ -6,11 +6,17 @@ BOOT_DIR_ABS="$3"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
|
||||||
|
-# So, let's skip to create initrd.
|
||||||
|
+# In this case, do not create the initrd.
|
||||||
|
if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# Skip this plugin if we're using a different generator. If nothing is specified,
|
||||||
|
+# assume we're wanted since we're installed.
|
||||||
|
+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
|
||||||
|
+ exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
# Do not attempt to create initramfs if the supplied image is already a UKI
|
||||||
|
if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
|
||||||
|
exit 0
|
||||||
|
@@ -38,6 +44,7 @@ elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; t
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
+
|
||||||
|
else
|
||||||
|
# No layout information, use users --uefi/--no-uefi preference
|
||||||
|
UEFI_OPTS=""
|
||||||
|
diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install
|
||||||
|
index 9312e242..decee283 100755
|
||||||
|
--- a/install.d/51-dracut-rescue.install
|
||||||
|
+++ b/install.d/51-dracut-rescue.install
|
||||||
|
@@ -7,6 +7,12 @@ KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="${3%/*}/0-rescue"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
+# Skip this plugin if we're using a different generator. If nothing is specified,
|
||||||
|
+# assume we're wanted since we're installed.
|
||||||
|
+if [ "${KERNEL_INSTALL_INITRD_GENERATOR:-dracut}" != "dracut" ]; then
|
||||||
|
+ exit 0
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
dropindirs_sort() {
|
||||||
|
suffix=$1
|
||||||
|
shift
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 430b1b06e60de78c28ed6e70982a30f41585b219 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||||
|
Date: Tue, 18 Jan 2022 18:58:58 +0100
|
||||||
|
Subject: [PATCH 03/13] fix(kernel-install): do not generate an initrd when one
|
||||||
|
was specified
|
||||||
|
|
||||||
|
According to the synopsis, kernel-install can be called with an
|
||||||
|
already-prepared initrd. In that case, no initrd should be generated by dracut.
|
||||||
|
|
||||||
|
(Cherry-picked commit 0b72cf5c4eca0e0db76e3e210cfdc48e6b49bb74 from PR#1825)
|
||||||
|
---
|
||||||
|
install.d/50-dracut.install | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install
|
||||||
|
index 3f961b11..076b4f5e 100755
|
||||||
|
--- a/install.d/50-dracut.install
|
||||||
|
+++ b/install.d/50-dracut.install
|
||||||
|
@@ -4,6 +4,7 @@ COMMAND="$1"
|
||||||
|
KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="$3"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
+INITRD_OPTIONS_SHIFT=4
|
||||||
|
|
||||||
|
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
|
||||||
|
# In this case, do not create the initrd.
|
||||||
|
@@ -60,6 +61,9 @@ ret=0
|
||||||
|
|
||||||
|
case "$COMMAND" in
|
||||||
|
add)
|
||||||
|
+ # If the initrd was provided on the kernel command line, we shouldn't generate our own.
|
||||||
|
+ [ "$#" -gt "$INITRD_OPTIONS_SHIFT" ] && exit 0
|
||||||
|
+
|
||||||
|
if [[ $IMAGE == "uki.efi" ]]; then
|
||||||
|
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi
|
||||||
|
else
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
51
0004-fix-resume-always-include-the-resume-module.patch
Normal file
51
0004-fix-resume-always-include-the-resume-module.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 67654956c27c159e29701a2b9fd9430d372a9f91 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Thu, 8 Aug 2024 00:21:12 +0200
|
||||||
|
Subject: [PATCH 04/13] fix(resume): always include the resume module
|
||||||
|
|
||||||
|
as we can't determine with certainity that it won't be needed.
|
||||||
|
|
||||||
|
rhel-only
|
||||||
|
|
||||||
|
Resolves: RHEL-53350
|
||||||
|
|
||||||
|
(commit messages from squashed commits:)
|
||||||
|
|
||||||
|
fix(resume): do not include resume if swap is on netdevice
|
||||||
|
|
||||||
|
Additional fix, restoring previous behavior identical to RHEL-9.
|
||||||
|
|
||||||
|
rhel-only
|
||||||
|
|
||||||
|
Resolves: RHEL-53350
|
||||||
|
---
|
||||||
|
modules.d/95resume/module-setup.sh | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95resume/module-setup.sh b/modules.d/95resume/module-setup.sh
|
||||||
|
index d419566e..785f681a 100755
|
||||||
|
--- a/modules.d/95resume/module-setup.sh
|
||||||
|
+++ b/modules.d/95resume/module-setup.sh
|
||||||
|
@@ -1,7 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
+# shellcheck disable=SC2317
|
||||||
|
check() {
|
||||||
|
+
|
||||||
|
swap_on_netdevice() {
|
||||||
|
local _dev
|
||||||
|
for _dev in "${swap_devs[@]}"; do
|
||||||
|
@@ -18,6 +20,9 @@ check() {
|
||||||
|
# hibernation support requested on kernel command line
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
+ # always include resume module when not on netdevice
|
||||||
|
+ return 0
|
||||||
|
+
|
||||||
|
# resume= not set on kernel command line
|
||||||
|
if [[ -f /sys/power/resume ]]; then
|
||||||
|
if [[ "$(< /sys/power/resume)" == "0:0" ]]; then
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 3e33ee5ce614059c9e4a81e8003df5142f1312c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||||
|
Date: Mon, 19 Jul 2021 11:27:28 +0200
|
||||||
|
Subject: [PATCH 05/13] fix(nfs): set correct ownership and permissions for
|
||||||
|
statd directory
|
||||||
|
|
||||||
|
The directory ownership for the statd directory should be
|
||||||
|
rpcuser:rpcuser.
|
||||||
|
|
||||||
|
(cherry picked from commit ed5ab5787177f2be8a620a8d2d63a9ad26fbf149 from PR#583)
|
||||||
|
|
||||||
|
Resolves: RHEL-53361
|
||||||
|
---
|
||||||
|
modules.d/95nfs/module-setup.sh | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/95nfs/module-setup.sh b/modules.d/95nfs/module-setup.sh
|
||||||
|
index c6fdd506..e36cd144 100755
|
||||||
|
--- a/modules.d/95nfs/module-setup.sh
|
||||||
|
+++ b/modules.d/95nfs/module-setup.sh
|
||||||
|
@@ -120,8 +120,13 @@ install() {
|
||||||
|
mkdir -m 0755 -p "$initdir/var/lib/nfs"
|
||||||
|
mkdir -m 0755 -p "$initdir/var/lib/nfs/rpc_pipefs"
|
||||||
|
mkdir -m 0770 -p "$initdir/var/lib/rpcbind"
|
||||||
|
- [ -d "/var/lib/nfs/statd/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm"
|
||||||
|
- [ -d "/var/lib/nfs/sm" ] && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm"
|
||||||
|
+ [ -d "$dracutsysrootdir/var/lib/nfs/statd/sm" ] \
|
||||||
|
+ && mkdir -m 0700 -p "$initdir/var/lib/nfs/statd" \
|
||||||
|
+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/statd/sm" \
|
||||||
|
+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/statd"
|
||||||
|
+ [ -d "$dracutsysrootdir/var/lib/nfs/sm" ] \
|
||||||
|
+ && mkdir -m 0755 -p "$initdir/var/lib/nfs/sm" \
|
||||||
|
+ && chown -R rpcuser:rpcuser "$initdir/var/lib/nfs/sm"
|
||||||
|
|
||||||
|
# Rather than copy the passwd file in, just set a user for rpcbind
|
||||||
|
# We'll save the state and restart the daemon from the root anyway
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From 7fea469146481fdf30e6f2c933fa85426b6a2927 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Sat, 17 Aug 2024 01:43:50 +0200
|
||||||
|
Subject: [PATCH 06/13] feat(dracut-init.sh): give --force-add precedence over
|
||||||
|
--omit
|
||||||
|
|
||||||
|
This gives precedence of force_add_dracutmodules to omit_dracutmodules,
|
||||||
|
as there is not other way to override omit_dracutmodules list, and users
|
||||||
|
would expect it to be overriden from command line.
|
||||||
|
|
||||||
|
Ref: https://github.com/dracut-ng/dracut-ng/pull/569
|
||||||
|
|
||||||
|
This way, `--add` retains it behaviour, and `--force-add` gains additional
|
||||||
|
functionality in non-hostonly mode. The module may still be skipped
|
||||||
|
if the module check returns 1, but it should throw error (as I'd expect
|
||||||
|
for `--force-add`).
|
||||||
|
|
||||||
|
(cherry picked commit a669346f48cbb3278c51ba5e95b1b91f9bfdee0a from PR#584)
|
||||||
|
|
||||||
|
Resolves: RHEL-53791
|
||||||
|
---
|
||||||
|
dracut-init.sh | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut-init.sh b/dracut-init.sh
|
||||||
|
index 1ce0d7ed..d78d3cd0 100755
|
||||||
|
--- a/dracut-init.sh
|
||||||
|
+++ b/dracut-init.sh
|
||||||
|
@@ -935,8 +935,10 @@ check_module() {
|
||||||
|
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
|
||||||
|
|
||||||
|
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
|
||||||
|
- ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
|
||||||
|
- return 1
|
||||||
|
+ if [[ " $force_add_dracutmodules " != *\ $_mod\ * ]]; then
|
||||||
|
+ ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
|
||||||
|
+ return 1
|
||||||
|
+ fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From 9e9193f6da0348eb476c3aff6d066292b10cefe1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Fri, 16 Aug 2024 20:40:15 +0200
|
||||||
|
Subject: [PATCH 07/13] feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
|
||||||
|
|
||||||
|
Introduce new path for lsinitrd.sh to look into:
|
||||||
|
|
||||||
|
/usr/lib/modules/$kver/initramfs.img
|
||||||
|
|
||||||
|
Which is valid on all ostree-based systems, and also other image based
|
||||||
|
systems with pre-generated initramfs.
|
||||||
|
|
||||||
|
Ref: https://issues.redhat.com/browse/RHEL-35890
|
||||||
|
(cherry picked from commit 22ae6ecaf9ecdb9db3e79aa9a72d527e7436c282)
|
||||||
|
|
||||||
|
Resolves: RHEL-54650
|
||||||
|
---
|
||||||
|
lsinitrd.sh | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lsinitrd.sh b/lsinitrd.sh
|
||||||
|
index ac49b5d7..f8696e68 100755
|
||||||
|
--- a/lsinitrd.sh
|
||||||
|
+++ b/lsinitrd.sh
|
||||||
|
@@ -125,6 +125,10 @@ find_initrd_for_kernel_version() {
|
||||||
|
echo "/lib/modules/${kernel_version}/initrd"
|
||||||
|
elif [[ -f /lib/modules/${kernel_version}/initramfs.img ]]; then
|
||||||
|
echo "/lib/modules/${kernel_version}/initramfs.img"
|
||||||
|
+ elif [[ -f /usr/lib/modules/${kernel_version}/initrd ]]; then
|
||||||
|
+ echo "/usr/lib/modules/${kernel_version}/initrd"
|
||||||
|
+ elif [[ -f /usr/lib/modules/${kernel_version}/initramfs.img ]]; then
|
||||||
|
+ echo "/usr/lib/modules/${kernel_version}/initramfs.img"
|
||||||
|
elif [[ -f /boot/initramfs-${kernel_version}.img ]]; then
|
||||||
|
echo "/boot/initramfs-${kernel_version}.img"
|
||||||
|
else
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
28
0008-feat-fips-include-fips-module-unconditionally.patch
Normal file
28
0008-feat-fips-include-fips-module-unconditionally.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From c41f441214a98284475f0965973c3541bd158df7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Mon, 19 Aug 2024 09:41:27 +0200
|
||||||
|
Subject: [PATCH 08/13] feat(fips): include fips module unconditionally
|
||||||
|
|
||||||
|
rhel-only
|
||||||
|
|
||||||
|
Resolves: RHEL-39404
|
||||||
|
---
|
||||||
|
modules.d/01fips/module-setup.sh | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
||||||
|
index a497ac5c..e3b7ca33 100755
|
||||||
|
--- a/modules.d/01fips/module-setup.sh
|
||||||
|
+++ b/modules.d/01fips/module-setup.sh
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
- return 255
|
||||||
|
+ return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 8002a6125bf3f36144a92643ea02ad3abfa5d6d8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||||
|
Date: Sun, 12 Jan 2025 20:01:09 -0500
|
||||||
|
Subject: [PATCH 09/13] fix(systemd-ask-password): do not half-install
|
||||||
|
systemd-ask-password-wall
|
||||||
|
|
||||||
|
Do not install the path unit when the service unit is not installed
|
||||||
|
for systemd-ask-password-wall.
|
||||||
|
|
||||||
|
Fixes the following warning on the CI:
|
||||||
|
|
||||||
|
[FAILED] Failed to start Forward Password Requests to Wall Directory Watch.
|
||||||
|
See 'systemctl status systemd-ask-password-wall.path' for details.
|
||||||
|
...
|
||||||
|
systemd[1]: systemd-ask-password-wall.path: Refusing to start, unit systemd-ask-password-wall.service to trigger not loaded.
|
||||||
|
systemd[1]: Failed to start Forward Password Requests to Wall Directory Watch.
|
||||||
|
|
||||||
|
(cherry picked from commit 4ddc0053e869eb37b7c3d4e08876a687e1a995ae)
|
||||||
|
|
||||||
|
Related: RHEL-65204
|
||||||
|
---
|
||||||
|
modules.d/01systemd-ask-password/module-setup.sh | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/01systemd-ask-password/module-setup.sh b/modules.d/01systemd-ask-password/module-setup.sh
|
||||||
|
index 40774ab9..8b09b69f 100755
|
||||||
|
--- a/modules.d/01systemd-ask-password/module-setup.sh
|
||||||
|
+++ b/modules.d/01systemd-ask-password/module-setup.sh
|
||||||
|
@@ -43,7 +43,6 @@ install() {
|
||||||
|
inst_multiple -o \
|
||||||
|
"$systemdsystemunitdir"/systemd-ask-password-console.path \
|
||||||
|
"$systemdsystemunitdir"/systemd-ask-password-console.service \
|
||||||
|
- "$systemdsystemunitdir"/multi-user.target.wants/systemd-ask-password-wall.path \
|
||||||
|
"$systemdsystemunitdir"/sysinit.target.wants/systemd-ask-password-console.path \
|
||||||
|
systemd-ask-password \
|
||||||
|
systemd-tty-ask-password-agent
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
37
0010-fix-pcsc-add-libpcsclite_real.so.patch
Normal file
37
0010-fix-pcsc-add-libpcsclite_real.so.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From 8f3b92db19bf4654d7346a1532928fcf172c09e6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Manuel Fombuena <fombuena@outlook.com>
|
||||||
|
Date: Thu, 31 Oct 2024 12:01:46 +0000
|
||||||
|
Subject: [PATCH 10/13] fix(pcsc): add libpcsclite_real.so.*
|
||||||
|
|
||||||
|
systemd-cryptsetup requires libpcsclite_real.so.1
|
||||||
|
|
||||||
|
Without it you get the following error:
|
||||||
|
|
||||||
|
systemd-cryptsetup[697]: loading "libpcsclite_real.so.1" failed: libpcsclite_real.so.1: cannot open shared object file: No such file or directory
|
||||||
|
|
||||||
|
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
|
||||||
|
|
||||||
|
(cherry picked from commit bfa00c2a03b07efae5a826aa881317acea9a4ec6)
|
||||||
|
|
||||||
|
Related: RHEL-65204
|
||||||
|
---
|
||||||
|
modules.d/91pcsc/module-setup.sh | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/modules.d/91pcsc/module-setup.sh b/modules.d/91pcsc/module-setup.sh
|
||||||
|
index 26b463d4..5ae1272b 100755
|
||||||
|
--- a/modules.d/91pcsc/module-setup.sh
|
||||||
|
+++ b/modules.d/91pcsc/module-setup.sh
|
||||||
|
@@ -51,7 +51,8 @@ install() {
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist" \
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so" \
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"pcsc/drivers/serial/libccidtwin.so" \
|
||||||
|
- {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite.so.*"
|
||||||
|
+ {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite.so.*" \
|
||||||
|
+ {"tls/$_arch/",tls/,"$_arch/",}"libpcsclite_real.so.*"
|
||||||
|
|
||||||
|
# Install the hosts local user configurations if enabled.
|
||||||
|
if [[ $hostonly ]]; then
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
30
0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch
Normal file
30
0011-revert-fix-rescue-make-rescue-always-no-hostonly.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From ad4549b5e8fb66ee33126ba01bbb24f4801a3936 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Wed, 29 Jan 2025 20:25:03 +0100
|
||||||
|
Subject: [PATCH 11/13] revert: "fix(rescue): make rescue always no-hostonly"
|
||||||
|
|
||||||
|
This partly reverts commit 224c00914bfb4ba1dee48e094ebb137facfd5947.
|
||||||
|
|
||||||
|
Related: RHEL-65204
|
||||||
|
---
|
||||||
|
install.d/51-dracut-rescue.install | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install
|
||||||
|
index decee283..1be9b882 100755
|
||||||
|
--- a/install.d/51-dracut-rescue.install
|
||||||
|
+++ b/install.d/51-dracut-rescue.install
|
||||||
|
@@ -119,8 +119,8 @@ case "$COMMAND" in
|
||||||
|
|
||||||
|
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
- dracut -f \
|
||||||
|
- --add-confdir rescue \
|
||||||
|
+ dracut -f --no-hostonly --no-uefi \
|
||||||
|
+ -a "rescue" \
|
||||||
|
$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
|
||||||
|
--kver "$KERNEL_VERSION" \
|
||||||
|
"$BOOT_DIR_ABS/$INITRD"
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
26
0012-fix-dracut-install-initize-fts-pointer.patch
Normal file
26
0012-fix-dracut-install-initize-fts-pointer.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 2c33b7315571dd0fd8240111018ce474fc45f667 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Thu, 13 Feb 2025 22:18:06 +0100
|
||||||
|
Subject: [PATCH 12/13] fix(dracut-install): initize fts pointer
|
||||||
|
|
||||||
|
Related: RHEL-65204
|
||||||
|
---
|
||||||
|
src/install/dracut-install.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c
|
||||||
|
index 96bc2eb6..3cd4e5cb 100644
|
||||||
|
--- a/src/install/dracut-install.c
|
||||||
|
+++ b/src/install/dracut-install.c
|
||||||
|
@@ -1681,7 +1681,7 @@ static void find_suppliers_for_sys_node(Hashmap *suppliers, const char *node_pat
|
||||||
|
|
||||||
|
static void find_suppliers(struct kmod_ctx *ctx)
|
||||||
|
{
|
||||||
|
- _cleanup_fts_close_ FTS *fts;
|
||||||
|
+ _cleanup_fts_close_ FTS *fts = NULL;
|
||||||
|
char *paths[] = { "/sys/devices/platform", NULL };
|
||||||
|
fts = fts_open(paths, FTS_NOSTAT | FTS_PHYSICAL, NULL);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
1021
0013-feat-add-openssl-module.patch
Normal file
1021
0013-feat-add-openssl-module.patch
Normal file
File diff suppressed because it is too large
Load Diff
26
0014-fix-openssl-harden-ossl-build-CFLAGS.patch
Normal file
26
0014-fix-openssl-harden-ossl-build-CFLAGS.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From a5e477c67c45b4439249ab92590f7b67dab4f7df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Mon, 17 Feb 2025 06:58:26 +0100
|
||||||
|
Subject: [PATCH 14/14] fix(openssl): harden ossl build CFLAGS
|
||||||
|
|
||||||
|
Related: RHEL-76323
|
||||||
|
---
|
||||||
|
src/ossl/Makefile | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/ossl/Makefile b/src/ossl/Makefile
|
||||||
|
index 17b418c2..200dcbb5 100644
|
||||||
|
--- a/src/ossl/Makefile
|
||||||
|
+++ b/src/ossl/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
.PHONY: all clean tests
|
||||||
|
|
||||||
|
CFLAGS ?= -std=c99 -Wall -Werror -pedantic -D_XOPEN_SOURCE=600
|
||||||
|
-CRYPTO_FLAGS = -lcrypto
|
||||||
|
+CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now
|
||||||
|
TARGETS = src/ossl-config src/ossl-files
|
||||||
|
|
||||||
|
TESTS_CONFIG = $(wildcard tests/config/*.cnf)
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
85
0015-fix-ossl-copy-executables-for-the-test-suite.patch
Normal file
85
0015-fix-ossl-copy-executables-for-the-test-suite.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
From d4b71c7fc24ba1245a86c41f904b05a18cbe3e15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Valena <pvalena@redhat.com>
|
||||||
|
Date: Mon, 17 Feb 2025 17:31:35 +0100
|
||||||
|
Subject: [PATCH 15/15] fix(ossl): copy executables for the test suite
|
||||||
|
|
||||||
|
and also fix CFLAGS in case of std=c99.
|
||||||
|
|
||||||
|
Related: RHEL-76323
|
||||||
|
---
|
||||||
|
Makefile | 20 ++++++++++++--------
|
||||||
|
src/ossl/Makefile | 2 +-
|
||||||
|
2 files changed, 13 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 4bc88561..51095b0a 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -88,11 +88,14 @@ util/util: $(UTIL_OBJECTS)
|
||||||
|
dracut-util: src/util/util
|
||||||
|
cp -a $< $@
|
||||||
|
|
||||||
|
-ossl: src/ossl/Makefile
|
||||||
|
+ossl:
|
||||||
|
$(MAKE) -C src/ossl
|
||||||
|
|
||||||
|
ossl-config: ossl
|
||||||
|
+ cp -a src/ossl/src/ossl-config $@
|
||||||
|
+
|
||||||
|
ossl-files: ossl
|
||||||
|
+ cp -a src/ossl/src/ossl-files $@
|
||||||
|
|
||||||
|
.PHONY: indent-c
|
||||||
|
indent-c:
|
||||||
|
@@ -205,20 +208,20 @@ endif
|
||||||
|
$(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \
|
||||||
|
done \
|
||||||
|
fi
|
||||||
|
- if [ -f src/install/dracut-install ]; then \
|
||||||
|
+ if [ -r src/install/dracut-install ]; then \
|
||||||
|
install -m 0755 src/install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \
|
||||||
|
fi
|
||||||
|
- if [ -f src/skipcpio/skipcpio ]; then \
|
||||||
|
+ if [ -r src/skipcpio/skipcpio ]; then \
|
||||||
|
install -m 0755 src/skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \
|
||||||
|
fi
|
||||||
|
- if [ -f dracut-util ]; then \
|
||||||
|
+ if [ -r dracut-util ]; then \
|
||||||
|
install -m 0755 dracut-util $(DESTDIR)$(pkglibdir)/dracut-util; \
|
||||||
|
fi
|
||||||
|
- if [ -f src/ossl/src/ossl-config ]; then \
|
||||||
|
- install -m 0755 src/ossl/src/ossl-config $(DESTDIR)$(pkglibdir)/ossl-config; \
|
||||||
|
+ if [ -r ossl-config ]; then \
|
||||||
|
+ install -m 0755 ossl-config $(DESTDIR)$(pkglibdir)/ossl-config; \
|
||||||
|
fi
|
||||||
|
- if [ -f src/ossl/src/ossl-files ]; then \
|
||||||
|
- install -m 0755 src/ossl/src/ossl-files $(DESTDIR)$(pkglibdir)/ossl-files; \
|
||||||
|
+ if [ -r ossl-files ]; then \
|
||||||
|
+ install -m 0755 ossl-files $(DESTDIR)$(pkglibdir)/ossl-files; \
|
||||||
|
fi
|
||||||
|
ifeq ($(enable_dracut_cpio),yes)
|
||||||
|
install -m 0755 dracut-cpio $(DESTDIR)$(pkglibdir)/dracut-cpio
|
||||||
|
@@ -245,6 +248,7 @@ clean:
|
||||||
|
$(RM) $(manpages)
|
||||||
|
$(RM) dracut.pc
|
||||||
|
$(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio*
|
||||||
|
+ $(RM) ossl-files ossl-config
|
||||||
|
$(MAKE) -C test clean
|
||||||
|
$(MAKE) -C src/ossl clean
|
||||||
|
|
||||||
|
diff --git a/src/ossl/Makefile b/src/ossl/Makefile
|
||||||
|
index 200dcbb5..43e7b464 100644
|
||||||
|
--- a/src/ossl/Makefile
|
||||||
|
+++ b/src/ossl/Makefile
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
.PHONY: all clean tests
|
||||||
|
|
||||||
|
CFLAGS ?= -std=c99 -Wall -Werror -pedantic -D_XOPEN_SOURCE=600
|
||||||
|
-CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now
|
||||||
|
+CRYPTO_FLAGS = -lcrypto -Wl,-pie -Wl,-z,now -fPIE
|
||||||
|
TARGETS = src/ossl-config src/ossl-files
|
||||||
|
|
||||||
|
TESTS_CONFIG = $(wildcard tests/config/*.cnf)
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From 3cb0f01a1e8a05dd4c6412907f5e9a398b2ace2c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Fri, 31 Aug 2018 13:06:34 +0200
|
|
||||||
Subject: [PATCH] Revert "use cp --reflink=auto"
|
|
||||||
|
|
||||||
This reverts commit 8cd8820547257299a33b2d1e3ecf7c6241a569b2.
|
|
||||||
Resolves: #1623990
|
|
||||||
---
|
|
||||||
50-dracut.install | 2 +-
|
|
||||||
51-dracut-rescue-postinst.sh | 2 +-
|
|
||||||
51-dracut-rescue.install | 2 +-
|
|
||||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/50-dracut.install b/50-dracut.install
|
|
||||||
index 64e3549f..ec59dcb3 100755
|
|
||||||
--- a/50-dracut.install
|
|
||||||
+++ b/50-dracut.install
|
|
||||||
@@ -25,7 +25,7 @@ case "$COMMAND" in
|
|
||||||
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
|
|
||||||
# we found an initrd at the same place as the kernel
|
|
||||||
# use this and don't generate a new one
|
|
||||||
- cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
|
|
||||||
+ cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
|
|
||||||
&& chown root:root "$BOOT_DIR_ABS/$INITRD" \
|
|
||||||
&& chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
|
|
||||||
&& exit 0
|
|
||||||
diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh
|
|
||||||
index 67f5b717..23158552 100755
|
|
||||||
--- a/51-dracut-rescue-postinst.sh
|
|
||||||
+++ b/51-dracut-rescue-postinst.sh
|
|
||||||
@@ -57,7 +57,7 @@ if [[ ! -f $INITRDFILE ]]; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
|
||||||
- cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
|
||||||
+ cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
|
||||||
((ret+=$?))
|
|
||||||
fi
|
|
||||||
|
|
||||||
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
|
|
||||||
index 6ddafdb6..426ddee5 100755
|
|
||||||
--- a/51-dracut-rescue.install
|
|
||||||
+++ b/51-dracut-rescue.install
|
|
||||||
@@ -93,7 +93,7 @@ case "$COMMAND" in
|
|
||||||
|
|
||||||
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
|
||||||
|
|
||||||
- if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
|
|
||||||
+ if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
|
|
||||||
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From 2e5265c80e03112c75888a31c170963e913070ed Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 14 Aug 2018 14:04:02 +0200
|
|
||||||
Subject: [PATCH] spec: return old provides
|
|
||||||
|
|
||||||
---
|
|
||||||
dracut.spec | 7 +++++++
|
|
||||||
1 file changed, 7 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/dracut.spec b/dracut.spec
|
|
||||||
index 155868ce..553280c3 100644
|
|
||||||
--- a/dracut.spec
|
|
||||||
+++ b/dracut.spec
|
|
||||||
@@ -65,6 +65,13 @@ Provides: dracut-fips = %{version}-%{release}
|
|
||||||
Obsoletes: dracut-fips-aesni <= 047
|
|
||||||
Provides: dracut-fips-aesni = %{version}-%{release}
|
|
||||||
|
|
||||||
+Obsoletes: dracut-kernel < 005
|
|
||||||
+Provides: dracut-kernel = %{version}-%{release}
|
|
||||||
+
|
|
||||||
+Obsoletes: dracut < 030
|
|
||||||
+Obsoletes: dracut-norescue < 030
|
|
||||||
+Provides: dracut-norescue = %{version}-%{release}
|
|
||||||
+
|
|
||||||
Requires: bash >= 4
|
|
||||||
Requires: coreutils
|
|
||||||
Requires: cpio
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From 44c9d019d88df05f69f2112aeae34bdbff61cee6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Sat, 29 Sep 2018 17:14:31 +0800
|
|
||||||
Subject: [PATCH] dracut.spec: Fix error introduced by 70291ed
|
|
||||||
|
|
||||||
70291e0 ('dracut.spec: Add dracut-squash package') introduced a new
|
|
||||||
dracut-squash package, but by accident it overrided some other package
|
|
||||||
spec and the dependency name is wrong. This patch will fix it.
|
|
||||||
---
|
|
||||||
dracut.spec | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.spec b/dracut.spec
|
|
||||||
index 553280c3..de57703c 100644
|
|
||||||
--- a/dracut.spec
|
|
||||||
+++ b/dracut.spec
|
|
||||||
@@ -188,7 +188,7 @@ This package contains tools to assemble the local initrd and host configuration.
|
|
||||||
%package squash
|
|
||||||
Summary: dracut module to build an initramfs with most files in a squashfs image
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
|
||||||
-Requires: squash-tools
|
|
||||||
+Requires: squashfs-tools
|
|
||||||
|
|
||||||
%description squash
|
|
||||||
This package provides a dracut module to build an initramfs, but store most files
|
|
||||||
@@ -459,14 +459,14 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|
||||||
%doc %{_mandir}/man8/dracut-catimages.8*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
-%files squash
|
|
||||||
-%{dracutlibdir}/modules.d/99squash
|
|
||||||
-
|
|
||||||
%{_bindir}/dracut-catimages
|
|
||||||
%dir /boot/dracut
|
|
||||||
%dir /var/lib/dracut
|
|
||||||
%dir /var/lib/dracut/overlay
|
|
||||||
|
|
||||||
+%files squash
|
|
||||||
+%{dracutlibdir}/modules.d/99squash
|
|
||||||
+
|
|
||||||
%files config-generic
|
|
||||||
%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
|
||||||
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 3b9b20d237b3ec939b1bf9dd065c875fee54fe63 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Fri, 12 Oct 2018 13:07:13 +0800
|
|
||||||
Subject: [PATCH] 40network: Don't include 40network by default
|
|
||||||
|
|
||||||
commit 7347391 ('network-legacy: split off from network module')
|
|
||||||
splitted network function to network-legacy and removed check() function
|
|
||||||
of 40network. This caused 40network to be included even if network is
|
|
||||||
not needed.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
|
|
||||||
Cherry-picked from: 83cbc06ab91288e2d931b4f36935bfdb79a99b0e
|
|
||||||
Resolves: #1639088
|
|
||||||
---
|
|
||||||
modules.d/40network/module-setup.sh | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
|
||||||
index 57c0a45e..e8541636 100755
|
|
||||||
--- a/modules.d/40network/module-setup.sh
|
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
|
||||||
@@ -1,5 +1,10 @@
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
+# called by dracut
|
|
||||||
+check() {
|
|
||||||
+ return 255
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
# called by dracut
|
|
||||||
depends() {
|
|
||||||
echo -n "kernel-network-modules "
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From b63e0c5040d9881f8c3c0bc09fc21c6588c8a26f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Thu, 18 Oct 2018 17:05:22 +0800
|
|
||||||
Subject: [PATCH] 99squash: Don't clean up squahfs on isolate
|
|
||||||
|
|
||||||
The only time we need to cleanup squahfs manually is on switch root, to
|
|
||||||
release resource and memory. We've covered that by setting
|
|
||||||
"Conflicts=initrd-switch-root.target" for squash cleanup service.
|
|
||||||
On shutdown systemd will take care of squahfs mounts. But for other
|
|
||||||
isolate, files in initramfs are most likely still required, so don't
|
|
||||||
clean up squahfs. For example, kdump's emergency handler will isolate
|
|
||||||
into its own target, if squahfs is cleaned up it will fail.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
|
|
||||||
Cherry-picked from: b9af0fcd
|
|
||||||
Resolves: #1641423
|
|
||||||
---
|
|
||||||
modules.d/99squash/squash-mnt-clear.service | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
index 8dd17812..f8d5db46 100644
|
|
||||||
--- a/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
+++ b/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
@@ -9,6 +9,7 @@ After=dracut-initqueue.service dracut-pre-pivot.service
|
|
||||||
Before=initrd-cleanup.service
|
|
||||||
ConditionPathExists=/squash/root
|
|
||||||
Conflicts=initrd-switch-root.target
|
|
||||||
+IgnoreOnIsolate=true
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From 5541b0c46f02f678c698aa523db7a86dde82a947 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Thu, 25 Oct 2018 15:30:36 +0200
|
|
||||||
Subject: [PATCH] dracut.install: call dracut with --force
|
|
||||||
|
|
||||||
The kernel-install is called even if you run make install.
|
|
||||||
Since we don't call dracut with -f a second make install will fail
|
|
||||||
because initrd with same version is already there.
|
|
||||||
This makes kernel developers feel miserable.
|
|
||||||
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1642402
|
|
||||||
|
|
||||||
Cherry-picked from: 48c283a2
|
|
||||||
Resolves: #1642402
|
|
||||||
---
|
|
||||||
50-dracut.install | 2 +-
|
|
||||||
51-dracut-rescue.install | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/50-dracut.install b/50-dracut.install
|
|
||||||
index ec59dcb3..139ff82e 100755
|
|
||||||
--- a/50-dracut.install
|
|
||||||
+++ b/50-dracut.install
|
|
||||||
@@ -49,7 +49,7 @@ case "$COMMAND" in
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
- dracut ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
|
||||||
+ dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
|
||||||
ret=$?
|
|
||||||
;;
|
|
||||||
remove)
|
|
||||||
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
|
|
||||||
index 426ddee5..0580062f 100755
|
|
||||||
--- a/51-dracut-rescue.install
|
|
||||||
+++ b/51-dracut-rescue.install
|
|
||||||
@@ -98,7 +98,7 @@ case "$COMMAND" in
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
|
|
||||||
- dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
|
||||||
+ dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
|
||||||
((ret+=$?))
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From d8386b5d8fae2e45a27635c48ecab63abba10e39 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Wed, 24 Oct 2018 15:14:03 +0200
|
|
||||||
Subject: [PATCH] Makefile: add srpm target
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 13 ++++++++++++-
|
|
||||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 80623437..503d069f 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -40,7 +40,7 @@ man8pages = dracut.8 \
|
|
||||||
|
|
||||||
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
|
||||||
|
|
||||||
-.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh
|
|
||||||
+.PHONY: install clean archive rpm srpm testimage test all check AUTHORS doc dracut-version.sh
|
|
||||||
|
|
||||||
all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio
|
|
||||||
|
|
||||||
@@ -216,6 +216,17 @@ rpm: dracut-$(VERSION).tar.xz syncheck
|
|
||||||
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
|
|
||||||
( mv "$$rpmbuild"/{,$$(arch)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
|
||||||
|
|
||||||
+srpm: dracut-$(VERSION).tar.xz syncheck
|
|
||||||
+ rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
|
||||||
+ cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
|
||||||
+ LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
|
||||||
+ (cd "$$rpmbuild"; \
|
|
||||||
+ [ -f $$src/lgpl-2.1.txt ] && cp $$src/lgpl-2.1.txt . || wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
|
|
||||||
+ rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
|
|
||||||
+ --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
|
|
||||||
+ --define "_rpmdir $$PWD" -bs dracut.spec; ) && \
|
|
||||||
+ ( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
|
||||||
+
|
|
||||||
syncheck:
|
|
||||||
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
|
|
||||||
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From 90054e4f1f2f64cb9a2b06b44b5a82b293c387dd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Thu, 10 Jan 2019 18:08:32 +0100
|
|
||||||
Subject: [PATCH] 95iscsi: decouple iscsi from sysinit.target
|
|
||||||
|
|
||||||
---
|
|
||||||
modules.d/95iscsi/module-setup.sh | 17 +++++++++++++++++
|
|
||||||
1 file changed, 17 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
||||||
index 5c2073bb..ae1924cc 100755
|
|
||||||
--- a/modules.d/95iscsi/module-setup.sh
|
|
||||||
+++ b/modules.d/95iscsi/module-setup.sh
|
|
||||||
@@ -265,6 +265,23 @@ install() {
|
|
||||||
echo "After=dracut-cmdline.service"
|
|
||||||
echo "Before=dracut-initqueue.service"
|
|
||||||
) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
|
||||||
+
|
|
||||||
+ # The iscsi deamon does not need to wait for any storage inside initrd
|
|
||||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.socket.d"
|
|
||||||
+ (
|
|
||||||
+ echo "[Unit]"
|
|
||||||
+ echo "DefaultDependencies=no"
|
|
||||||
+ echo "Conflicts=shutdown.target"
|
|
||||||
+ echo "Before=shutdown.target sockets.target"
|
|
||||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
|
|
||||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsuio.socket.d"
|
|
||||||
+ (
|
|
||||||
+ echo "[Unit]"
|
|
||||||
+ echo "DefaultDependencies=no"
|
|
||||||
+ echo "Conflicts=shutdown.target"
|
|
||||||
+ echo "Before=shutdown.target sockets.target"
|
|
||||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsuio.socket.d/dracut.conf"
|
|
||||||
+
|
|
||||||
fi
|
|
||||||
inst_dir /var/lib/iscsi
|
|
||||||
dracut_need_initqueue
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From e44c26f0fc6b29fb42cbc6d5ab57e34b07aa2ce1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 15 Jan 2019 16:42:38 +0100
|
|
||||||
Subject: [PATCH] 95iscsi: fix a typo in a name of iscsiuio
|
|
||||||
|
|
||||||
---
|
|
||||||
modules.d/95iscsi/module-setup.sh | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
||||||
index ae1924cc..79af4a47 100755
|
|
||||||
--- a/modules.d/95iscsi/module-setup.sh
|
|
||||||
+++ b/modules.d/95iscsi/module-setup.sh
|
|
||||||
@@ -274,13 +274,13 @@ install() {
|
|
||||||
echo "Conflicts=shutdown.target"
|
|
||||||
echo "Before=shutdown.target sockets.target"
|
|
||||||
) > "${initdir}/$systemdsystemunitdir/iscsid.socket.d/dracut.conf"
|
|
||||||
- mkdir -p "${initdir}/$systemdsystemunitdir/iscsuio.socket.d"
|
|
||||||
+ mkdir -p "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d"
|
|
||||||
(
|
|
||||||
echo "[Unit]"
|
|
||||||
echo "DefaultDependencies=no"
|
|
||||||
echo "Conflicts=shutdown.target"
|
|
||||||
echo "Before=shutdown.target sockets.target"
|
|
||||||
- ) > "${initdir}/$systemdsystemunitdir/iscsuio.socket.d/dracut.conf"
|
|
||||||
+ ) > "${initdir}/$systemdsystemunitdir/iscsiuio.socket.d/dracut.conf"
|
|
||||||
|
|
||||||
fi
|
|
||||||
inst_dir /var/lib/iscsi
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From c787ad30ab5467c9f3c740a1cd7ed8b3198b9719 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 21 May 2019 17:58:38 +0200
|
|
||||||
Subject: [PATCH] net-lib: strstr is not for globs
|
|
||||||
|
|
||||||
(cherry picked from commit 1a3dcc8b46c967445794e679280a3fb3b8e77ae0)
|
|
||||||
|
|
||||||
Resolves: #1712469
|
|
||||||
---
|
|
||||||
modules.d/40network/net-lib.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index 1e7f1b33..7b93f25e 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -463,7 +463,7 @@ ip_to_var() {
|
|
||||||
# ip=<ipv4-address> means anaconda-style static config argument cluster
|
|
||||||
autoconf="$1"
|
|
||||||
|
|
||||||
- if strstr "$autoconf" "*.*.*.*"; then
|
|
||||||
+ if strglob "$autoconf" "*.*.*.*"; then
|
|
||||||
# ip=<ipv4-address> means anaconda-style static config argument cluster:
|
|
||||||
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
|
|
||||||
# ksdevice={link|bootif|ibft|<MAC>|<ifname>}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
From 81b59fbbd6ebeee05b5d6869ae4f36bb9e486f72 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 8 Jan 2019 17:16:07 +0100
|
|
||||||
Subject: [PATCH] 95iscsi: rd.iscsi.initiator should have priority over stored
|
|
||||||
configuration
|
|
||||||
|
|
||||||
(cherry picked from commit 61afc704548cecc7f7d2fa3b5f1319e790cc5bee)
|
|
||||||
|
|
||||||
Resolves: #1664062
|
|
||||||
---
|
|
||||||
modules.d/95iscsi/parse-iscsiroot.sh | 15 +++++++--------
|
|
||||||
1 file changed, 7 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95iscsi/parse-iscsiroot.sh b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
||||||
index 7a64d888..f00a83bb 100755
|
|
||||||
--- a/modules.d/95iscsi/parse-iscsiroot.sh
|
|
||||||
+++ b/modules.d/95iscsi/parse-iscsiroot.sh
|
|
||||||
@@ -107,14 +107,13 @@ if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ] && ! [
|
|
||||||
iscsi_initiator=$arg
|
|
||||||
echo "InitiatorName=$iscsi_initiator" > /run/initiatorname.iscsi
|
|
||||||
ln -fs /run/initiatorname.iscsi /dev/.initiatorname.iscsi
|
|
||||||
- if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
|
||||||
- mkdir -p /etc/iscsi
|
|
||||||
- ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
|
||||||
- if [ -n "$DRACUT_SYSTEMD" ]; then
|
|
||||||
- systemctl try-restart iscsid
|
|
||||||
- # FIXME: iscsid is not yet ready, when the service is :-/
|
|
||||||
- sleep 1
|
|
||||||
- fi
|
|
||||||
+ rm -f /etc/iscsi/initiatorname.iscsi
|
|
||||||
+ mkdir -p /etc/iscsi
|
|
||||||
+ ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
|
||||||
+ if [ -n "$DRACUT_SYSTEMD" ]; then
|
|
||||||
+ systemctl try-restart iscsid
|
|
||||||
+ # FIXME: iscsid is not yet ready, when the service is :-/
|
|
||||||
+ sleep 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
|||||||
From 9c54932f590fd7accadc780c6ee946a94286b7e6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 14 May 2019 09:23:55 +0200
|
|
||||||
Subject: [PATCH] fips: split loading the crypto modules and checking the
|
|
||||||
kernel
|
|
||||||
|
|
||||||
In e54ab383 we moved the fips script to a later pahse of boot, since
|
|
||||||
the /boot might not be available early on.
|
|
||||||
|
|
||||||
The problem is that systemd-cryptsetup* services could be run now
|
|
||||||
started before the do_fips is executed and need the crypto modules
|
|
||||||
to decrypted the devices.
|
|
||||||
|
|
||||||
So let's split the do_fips and load the module before udev does the
|
|
||||||
trigger.
|
|
||||||
---
|
|
||||||
modules.d/01fips/fips-load-crypto.sh | 8 ++++++++
|
|
||||||
modules.d/01fips/fips.sh | 19 +++++++++++--------
|
|
||||||
modules.d/01fips/module-setup.sh | 1 +
|
|
||||||
3 files changed, 20 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/fips-load-crypto.sh b/modules.d/01fips/fips-load-crypto.sh
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..82cbeee4
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/01fips/fips-load-crypto.sh
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+
|
|
||||||
+if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
|
||||||
+ rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
|
||||||
+else
|
|
||||||
+ . /sbin/fips.sh
|
|
||||||
+ fips_load_crypto || die "FIPS integrity test failed"
|
|
||||||
+fi
|
|
||||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
||||||
index 9bc089f2..beaa692b 100755
|
|
||||||
--- a/modules.d/01fips/fips.sh
|
|
||||||
+++ b/modules.d/01fips/fips.sh
|
|
||||||
@@ -69,15 +69,8 @@ do_rhevh_check()
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
-do_fips()
|
|
||||||
+fips_load_crypto()
|
|
||||||
{
|
|
||||||
- local _v
|
|
||||||
- local _s
|
|
||||||
- local _v
|
|
||||||
- local _module
|
|
||||||
-
|
|
||||||
- KERNEL=$(uname -r)
|
|
||||||
-
|
|
||||||
FIPSMODULES=$(cat /etc/fipsmodules)
|
|
||||||
|
|
||||||
info "Loading and integrity checking all crypto modules"
|
|
||||||
@@ -102,6 +95,16 @@ do_fips()
|
|
||||||
info "Self testing crypto algorithms"
|
|
||||||
modprobe tcrypt || return 1
|
|
||||||
rmmod tcrypt
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+do_fips()
|
|
||||||
+{
|
|
||||||
+ local _v
|
|
||||||
+ local _s
|
|
||||||
+ local _v
|
|
||||||
+ local _module
|
|
||||||
+
|
|
||||||
+ KERNEL=$(uname -r)
|
|
||||||
|
|
||||||
info "Checking integrity of kernel"
|
|
||||||
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
|
|
||||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
|
||||||
index f3af4d90..18186d62 100755
|
|
||||||
--- a/modules.d/01fips/module-setup.sh
|
|
||||||
+++ b/modules.d/01fips/module-setup.sh
|
|
||||||
@@ -54,6 +54,7 @@ install() {
|
|
||||||
local _dir
|
|
||||||
inst_hook pre-trigger 01 "$moddir/fips-boot.sh"
|
|
||||||
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
|
|
||||||
+ inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
|
|
||||||
inst_script "$moddir/fips.sh" /sbin/fips.sh
|
|
||||||
|
|
||||||
inst_multiple sha512hmac rmmod insmod mount uname umount
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
From a1435c3d535707f1d21aaf85e62175ff2bb1ad2b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Thu, 14 Mar 2019 18:54:10 +0800
|
|
||||||
Subject: [PATCH] fips: ensure fs module for /boot is installed
|
|
||||||
|
|
||||||
When using dracut with --hostonly and --no-hostonly-default-device,
|
|
||||||
/boot will be inaccessible as dracut will most fs modules unless
|
|
||||||
specified. But FIPS require /boot to be accessible, and it will try
|
|
||||||
to mount it on boot. It will fail if corresponding fs module is missing.
|
|
||||||
|
|
||||||
For most case /boot will be a simple partition, include the fs module
|
|
||||||
will be enough for FIPS to mount it. For other cases users have to pass
|
|
||||||
extra parameters by themselves.
|
|
||||||
|
|
||||||
Suggested-by: Kenneth Dsouza <kdsouza@redhat.com>
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
---
|
|
||||||
modules.d/01fips/module-setup.sh | 12 +++++++++++-
|
|
||||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
|
||||||
index 18186d62..89734a09 100755
|
|
||||||
--- a/modules.d/01fips/module-setup.sh
|
|
||||||
+++ b/modules.d/01fips/module-setup.sh
|
|
||||||
@@ -12,7 +12,7 @@ depends() {
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
installkernel() {
|
|
||||||
- local _fipsmodules _mod
|
|
||||||
+ local _fipsmodules _mod _bootfstype
|
|
||||||
if [[ -f "${srcmods}/modules.fips" ]]; then
|
|
||||||
_fipsmodules="$(cat "${srcmods}/modules.fips")"
|
|
||||||
else
|
|
||||||
@@ -47,6 +47,16 @@ installkernel() {
|
|
||||||
echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
+
|
|
||||||
+ # with hostonly_default_device fs module for /boot is not installed by default
|
|
||||||
+ if [[ $hostonly ]] && [[ "$hostonly_default_device" == "no" ]]; then
|
|
||||||
+ _bootfstype=$(find_mp_fstype /boot)
|
|
||||||
+ if [[ -n "$_bootfstype" ]]; then
|
|
||||||
+ hostonly='' instmods $_bootfstype
|
|
||||||
+ else
|
|
||||||
+ dwarning "Can't determine fs type for /boot, FIPS check may fail."
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 7c35556da4c803bbb08c96e96262e598d5c42274 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Tue, 21 Aug 2018 13:14:44 +0200
|
|
||||||
Subject: [PATCH] network: skip already enslaved interfaces
|
|
||||||
|
|
||||||
(cherry picked from commit f6e3b59e5ea6f52a25631557badc7f4dfabbd7ee)
|
|
||||||
|
|
||||||
Resolves: #1625042
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 6 +++++-
|
|
||||||
modules.d/40network/net-lib.sh | 7 +++++++
|
|
||||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index ea2a67ff..b4f5bf10 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -408,7 +408,11 @@ for p in $(getargs ip=); do
|
|
||||||
esac
|
|
||||||
|
|
||||||
# If this option isn't directed at our interface, skip it
|
|
||||||
- [ -n "$dev" ] && [ "$dev" != "$netif" ] && continue
|
|
||||||
+ if [ -n "$dev" ]; then
|
|
||||||
+ [ "$dev" != "$netif" ] && continue
|
|
||||||
+ else
|
|
||||||
+ iface_is_enslaved "$netif" && continue
|
|
||||||
+ fi
|
|
||||||
|
|
||||||
# Store config for later use
|
|
||||||
for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index 7b93f25e..f9569573 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -745,6 +745,13 @@ iface_has_link() {
|
|
||||||
iface_has_carrier "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
+iface_is_enslaved() {
|
|
||||||
+ local _li
|
|
||||||
+ _li=$(ip -o link show dev $1)
|
|
||||||
+ strstr "$li" " master " || return 1
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
find_iface_with_link() {
|
|
||||||
local iface_path="" iface=""
|
|
||||||
for iface_path in /sys/class/net/*; do
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 4971a2c4eb4526cb88a5c9aff30c57527a746036 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 16 Jul 2019 08:27:01 +0100
|
|
||||||
Subject: [PATCH] 01fips: add cfb cipher
|
|
||||||
|
|
||||||
Required by FIPS standard
|
|
||||||
---
|
|
||||||
modules.d/01fips/module-setup.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
|
|
||||||
index 89734a09..f011f15d 100755
|
|
||||||
--- a/modules.d/01fips/module-setup.sh
|
|
||||||
+++ b/modules.d/01fips/module-setup.sh
|
|
||||||
@@ -24,7 +24,7 @@ installkernel() {
|
|
||||||
_fipsmodules+="crc32c crct10dif ghash "
|
|
||||||
|
|
||||||
# Ciphers:
|
|
||||||
- _fipsmodules+="cipher_null des3_ede aes "
|
|
||||||
+ _fipsmodules+="cipher_null des3_ede aes cfb "
|
|
||||||
|
|
||||||
# Modes/templates:
|
|
||||||
_fipsmodules+="ecb cbc ctr xts gcm ccm authenc hmac cmac "
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
|||||||
From 31116110ff0090324a568ce2aba6519a860d66b3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
|
|
||||||
Date: Thu, 11 Jul 2019 10:50:40 +0200
|
|
||||||
Subject: [PATCH] rngd: new module running early during boot to help generating
|
|
||||||
entropy when system's default entropy sources are poor (e.g. use of SSD disks
|
|
||||||
or UEFI RNG not available)
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
On systems with low entropy at boot, the boot can take up to several
|
|
||||||
hours, specially when NBDE is used (e.g. clevis) which makes use of
|
|
||||||
the random number generator.
|
|
||||||
|
|
||||||
Enabling rngd service at boot early, because dracut-initqueue runs,
|
|
||||||
enables to initialize the random number generator in a couple of seconds
|
|
||||||
instead of minutes or hours.
|
|
||||||
|
|
||||||
Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
|
|
||||||
(cherry picked from commit adee5b97bc5418b6e357342bb3be20568668aa55)
|
|
||||||
|
|
||||||
Resolves: #1726617
|
|
||||||
---
|
|
||||||
modules.d/06rngd/module-setup.sh | 39 +++++++++++++++++++++++++++++++++++++++
|
|
||||||
modules.d/06rngd/rngd.service | 7 +++++++
|
|
||||||
2 files changed, 46 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..43d5c2d3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/06rngd/module-setup.sh
|
|
||||||
@@ -0,0 +1,39 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+# vim: set tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80:
|
|
||||||
+#
|
|
||||||
+# Copyright (c) 2019 Red Hat, Inc.
|
|
||||||
+# Author: Renaud Métrich <rmetrich@redhat.com>
|
|
||||||
+#
|
|
||||||
+# This program is free software: you can redistribute it and/or modify
|
|
||||||
+# it under the terms of the GNU General Public License as published by
|
|
||||||
+# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
+#
|
|
||||||
+# This program is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+# GNU General Public License for more details.
|
|
||||||
+#
|
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+#
|
|
||||||
+
|
|
||||||
+depends() {
|
|
||||||
+ echo systemd
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+check() {
|
|
||||||
+ # if there's no rngd binary, no go.
|
|
||||||
+ require_binaries rngd || return 1
|
|
||||||
+
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+install() {
|
|
||||||
+ inst rngd
|
|
||||||
+ inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
|
|
||||||
+ mkdir -p "${initdir}${systemdsystemunitdir}/sysinit.target.wants"
|
|
||||||
+ ln -rfs "${initdir}${systemdsystemunitdir}/rngd.service" \
|
|
||||||
+ "${initdir}${systemdsystemunitdir}/sysinit.target.wants/rngd.service"
|
|
||||||
+}
|
|
||||||
diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..570fbedb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/06rngd/rngd.service
|
|
||||||
@@ -0,0 +1,7 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Hardware RNG Entropy Gatherer Daemon
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Before=systemd-udevd.service
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+ExecStart=/usr/sbin/rngd -f
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
From d86dfcd148e5d726f00b8a83eeadb11aa0017fba Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Mon, 22 Jul 2019 14:07:26 +0200
|
|
||||||
Subject: [PATCH] dracut.spec: add 06rngd
|
|
||||||
|
|
||||||
---
|
|
||||||
dracut.spec | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/dracut.spec b/dracut.spec
|
|
||||||
index de57703c..92c7f7bf 100644
|
|
||||||
--- a/dracut.spec
|
|
||||||
+++ b/dracut.spec
|
|
||||||
@@ -346,6 +346,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|
||||||
%{dracutlibdir}/modules.d/03rescue
|
|
||||||
%{dracutlibdir}/modules.d/04watchdog
|
|
||||||
%{dracutlibdir}/modules.d/05busybox
|
|
||||||
+%{dracutlibdir}/modules.d/06rngd
|
|
||||||
%{dracutlibdir}/modules.d/10i18n
|
|
||||||
%{dracutlibdir}/modules.d/30convertfs
|
|
||||||
%{dracutlibdir}/modules.d/45url-lib
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 927428e6a5e90b2214ee9edf15d4eb6c0fc5c203 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Mon, 11 Mar 2019 18:44:02 +0800
|
|
||||||
Subject: [PATCH] squash: squash systemd binary and udevadm
|
|
||||||
|
|
||||||
systemd binary and udevadm are not needed to be outside the squash
|
|
||||||
image. Some binaries are kept outside because they are required before
|
|
||||||
mounting the image, or after umounting the image (when switching root),
|
|
||||||
or they may block umounting the image. But we are using lazy umounting,
|
|
||||||
so actually nothing will block the umount.
|
|
||||||
|
|
||||||
Keep more binaries outside the squash image won't hurt but cost extra
|
|
||||||
memories, the idea of squash image is to save memory usage.
|
|
||||||
|
|
||||||
So, there is no reason to keep udevadm outside, that should be a debug
|
|
||||||
left over. For systemd binary, it's running when switch root happens,
|
|
||||||
But we have lazy umounted the image and overlay, once systemd process
|
|
||||||
exec the new systemd in new root, everything will be cleared by kernel.
|
|
||||||
|
|
||||||
Also tidy up the comment make it less confussing.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit e1e1f6e8e6747d8f32c065e267e0a57587818c9e)
|
|
||||||
|
|
||||||
Resolves: #1691705
|
|
||||||
---
|
|
||||||
dracut.sh | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index e683a9bc..a0158f22 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1772,9 +1772,11 @@ if dracut_module_included "squash"; then
|
|
||||||
mv $initdir/$folder $squash_dir/$folder
|
|
||||||
done
|
|
||||||
|
|
||||||
- # Reinstall required files, because we have moved some important folders to $squash_dir
|
|
||||||
- inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" \
|
|
||||||
- "systemctl" "udevadm" "$systemdutildir/systemd"
|
|
||||||
+ # Reinstall required files for the squash image setup script.
|
|
||||||
+ # We have moved them inside the squashed image, but they need to be
|
|
||||||
+ # accessible before mounting the image. Also install systemctl,
|
|
||||||
+ # it's requires for switch-root, but we will umount the image before switch-root
|
|
||||||
+ inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" "systemctl"
|
|
||||||
hostonly="" instmods "loop" "squashfs" "overlay"
|
|
||||||
|
|
||||||
for folder in "${squash_candidate[@]}"; do
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
|||||||
From b6d52b504fc7eefc3f405f75463d9e818471ee99 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Mon, 11 Mar 2019 19:46:19 +0800
|
|
||||||
Subject: [PATCH] squash: fix and simplify required_in_root
|
|
||||||
|
|
||||||
If required target is a symbol link, create the link then following the
|
|
||||||
link. If it's a directory, create new directory, else just move it.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 11ce69e4bd9172cf54251ea62bb4a5ead1700fd6)
|
|
||||||
|
|
||||||
Resolves: #1691705
|
|
||||||
---
|
|
||||||
dracut.sh | 42 +++++++++++++++++++-----------------------
|
|
||||||
1 file changed, 19 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index a0158f22..6de88b3e 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1811,30 +1811,26 @@ if dracut_module_included "squash"; then
|
|
||||||
required_in_root $(dirname $file)
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if [[ -d $_sqsh_file ]]; then
|
|
||||||
- if [[ -L $_sqsh_file ]]; then
|
|
||||||
- cp --preserve=all -P $_sqsh_file $_init_file
|
|
||||||
- else
|
|
||||||
- mkdir $_init_file
|
|
||||||
- fi
|
|
||||||
+ if [[ -L $_sqsh_file ]]; then
|
|
||||||
+ cp --preserve=all -P $_sqsh_file $_init_file
|
|
||||||
+ _sqsh_file=$(realpath $_sqsh_file 2>/dev/null)
|
|
||||||
+ if [[ -e $_sqsh_file ]] && [[ "$_sqsh_file" == "$squash_dir"* ]]; then
|
|
||||||
+ # Relative symlink
|
|
||||||
+ required_in_root ${_sqsh_file#$squash_dir/}
|
|
||||||
+ return
|
|
||||||
+ fi
|
|
||||||
+ if [[ -e $squash_dir$_sqsh_file ]]; then
|
|
||||||
+ # Absolute symlink
|
|
||||||
+ required_in_root ${_sqsh_file#/}
|
|
||||||
+ return
|
|
||||||
+ fi
|
|
||||||
+ required_in_root ${module_spec#$squash_dir/}
|
|
||||||
else
|
|
||||||
- if [[ -L $_sqsh_file ]]; then
|
|
||||||
- cp --preserve=all -P $_sqsh_file $_init_file
|
|
||||||
- _sqsh_file=$(realpath $_sqsh_file 2>/dev/null)
|
|
||||||
- if [[ -e $_sqsh_file ]] && [[ "$_sqsh_file" == "$squash_dir"* ]]; then
|
|
||||||
- # Relative symlink
|
|
||||||
- required_in_root ${_sqsh_file#$squash_dir/}
|
|
||||||
- return
|
|
||||||
- fi
|
|
||||||
- if [[ -e $squash_dir$_sqsh_file ]]; then
|
|
||||||
- # Absolute symlink
|
|
||||||
- required_in_root ${_sqsh_file#/}
|
|
||||||
- return
|
|
||||||
- fi
|
|
||||||
- required_in_root ${module_spec#$squash_dir/}
|
|
||||||
- else
|
|
||||||
- mv $_sqsh_file $_init_file
|
|
||||||
- fi
|
|
||||||
+ if [[ -d $_sqsh_file ]]; then
|
|
||||||
+ mkdir $_init_file
|
|
||||||
+ else
|
|
||||||
+ mv $_sqsh_file $_init_file
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
|||||||
From 829ed8ef5cca250fac475ad6b0265c792c3af015 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 13 Mar 2019 17:36:53 +0800
|
|
||||||
Subject: [PATCH] squash: also squash systemctl if switch-root is not needed
|
|
||||||
|
|
||||||
systemctl need to be accessible on switch-root, but we unmount the
|
|
||||||
squash image on switch-root, so it will fail. systemctl depends on a lot
|
|
||||||
of libraries, squash them can save more RAM. So allow modules
|
|
||||||
(eg. kdump) to tell dracut that switch-root will be intercepted,
|
|
||||||
then we don't need to take care of that.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 3ee0ca5eb74be5d1fbd0e6d643f6fff06234177f)
|
|
||||||
|
|
||||||
Resolves: #1691705
|
|
||||||
---
|
|
||||||
dracut-init.sh | 4 ++++
|
|
||||||
dracut.sh | 40 ++++++++++++++++++++++------------------
|
|
||||||
2 files changed, 26 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
||||||
index 50d23e2d..b1ac9966 100644
|
|
||||||
--- a/dracut-init.sh
|
|
||||||
+++ b/dracut-init.sh
|
|
||||||
@@ -150,6 +150,10 @@ dracut_module_included() {
|
|
||||||
[[ " $mods_to_load $modules_loaded " == *\ $*\ * ]]
|
|
||||||
}
|
|
||||||
|
|
||||||
+dracut_no_switch_root() {
|
|
||||||
+ >"$initdir/lib/dracut/no-switch-root"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
if ! [[ $DRACUT_INSTALL ]]; then
|
|
||||||
DRACUT_INSTALL=$(find_binary dracut-install)
|
|
||||||
fi
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index 6de88b3e..8144a16e 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1772,24 +1772,6 @@ if dracut_module_included "squash"; then
|
|
||||||
mv $initdir/$folder $squash_dir/$folder
|
|
||||||
done
|
|
||||||
|
|
||||||
- # Reinstall required files for the squash image setup script.
|
|
||||||
- # We have moved them inside the squashed image, but they need to be
|
|
||||||
- # accessible before mounting the image. Also install systemctl,
|
|
||||||
- # it's requires for switch-root, but we will umount the image before switch-root
|
|
||||||
- inst_multiple "echo" "sh" "mount" "modprobe" "mkdir" "systemctl"
|
|
||||||
- hostonly="" instmods "loop" "squashfs" "overlay"
|
|
||||||
-
|
|
||||||
- for folder in "${squash_candidate[@]}"; do
|
|
||||||
- # Remove duplicated files in squashfs image, save some more space
|
|
||||||
- [[ ! -d $initdir/$folder/ ]] && continue
|
|
||||||
- for file in $(find $initdir/$folder/ -not -type d);
|
|
||||||
- do
|
|
||||||
- if [[ -e $squash_dir${file#$initdir} ]]; then
|
|
||||||
- mv $squash_dir${file#$initdir} $file
|
|
||||||
- fi
|
|
||||||
- done
|
|
||||||
- done
|
|
||||||
-
|
|
||||||
# Move some files out side of the squash image, including:
|
|
||||||
# - Files required to boot and mount the squashfs image
|
|
||||||
# - Files need to be accessable without mounting the squash image
|
|
||||||
@@ -1851,6 +1833,28 @@ if dracut_module_included "squash"; then
|
|
||||||
ln -s squash/init.sh $initdir/init
|
|
||||||
ln -s squash/shutdown.sh $initdir/shutdown
|
|
||||||
|
|
||||||
+ # Reinstall required files for the squash image setup script.
|
|
||||||
+ # We have moved them inside the squashed image, but they need to be
|
|
||||||
+ # accessible before mounting the image.
|
|
||||||
+ inst_multiple "echo" "sh" "mount" "modprobe" "mkdir"
|
|
||||||
+ hostonly="" instmods "loop" "squashfs" "overlay"
|
|
||||||
+
|
|
||||||
+ # Only keep systemctl outsite if we need switch root
|
|
||||||
+ if [[ ! -f "$initdir/lib/dracut/no-switch-root" ]]; then
|
|
||||||
+ inst "systemctl"
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ for folder in "${squash_candidate[@]}"; do
|
|
||||||
+ # Remove duplicated files in squashfs image, save some more space
|
|
||||||
+ [[ ! -d $initdir/$folder/ ]] && continue
|
|
||||||
+ for file in $(find $initdir/$folder/ -not -type d);
|
|
||||||
+ do
|
|
||||||
+ if [[ -e $squash_dir${file#$initdir} ]]; then
|
|
||||||
+ mv $squash_dir${file#$initdir} $file
|
|
||||||
+ fi
|
|
||||||
+ done
|
|
||||||
+ done
|
|
||||||
+
|
|
||||||
mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
|||||||
From 7ee74e539dba61c3765afe34426b085eff0de027 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Thu, 21 Feb 2019 13:18:37 +0800
|
|
||||||
Subject: [PATCH] dracut: let module handling function accept optional path
|
|
||||||
option
|
|
||||||
|
|
||||||
Let the caller pass in the module path instead of try to find the module
|
|
||||||
path everytime. This helps optimize the overall runtime.
|
|
||||||
|
|
||||||
Test results (3 rounds) on Fedora 30 in KVM VM with 8 CPUs, 2G memory, HDD:
|
|
||||||
|
|
||||||
$ time ./dracut.sh --local --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode 'strict' -o 'plymouth dash resume ifcfg' --mount '/dev/mapper/fedora-root /sysroot xfs defaults' --no-hostonly-default-device -f initramfs.img
|
|
||||||
Before the commit:
|
|
||||||
real 0m11.782s | real 0m11.505s | real 0m11.958s
|
|
||||||
user 0m9.169s | user 0m9.218s | user 0m9.327s
|
|
||||||
sys 0m10.839s | sys 0m10.829s | sys 0m10.925s
|
|
||||||
|
|
||||||
After this commit:
|
|
||||||
real 0m9.866s | real 0m9.580s | real 0m9.638s
|
|
||||||
user 0m9.048s | user 0m9.142s | user 0m9.120s
|
|
||||||
sys 0m7.411s | sys 0m7.775s | sys 0m7.745s
|
|
||||||
|
|
||||||
Test result of building a ordinary image:
|
|
||||||
|
|
||||||
$ time ./dracut.sh --local --quiet -f initramfs.img
|
|
||||||
Before the commit:
|
|
||||||
real 0m34.697s | real 0m34.371s | real 0m35.122s
|
|
||||||
user 0m27.608s | user 0m27.524s | user 0m27.705s
|
|
||||||
sys 0m22.341s | sys 0m22.032s | sys 0m22.246s
|
|
||||||
|
|
||||||
After the commit:
|
|
||||||
real 0m31.914s | real 0m31.006 | real 0m31.289ss
|
|
||||||
user 0m27.315s | user 0m27.324 | user 0m27.290ss
|
|
||||||
sys 0m19.051s | sys 0m18.916 | sys 0m19.022ss
|
|
||||||
|
|
||||||
This will have an ~2s speed up.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 5916d31b24ad9eb21fd376929a96c459813315a1)
|
|
||||||
|
|
||||||
Cherry-picked from: 5916d31b
|
|
||||||
Resolves: #1734047
|
|
||||||
---
|
|
||||||
dracut-init.sh | 4 ++++
|
|
||||||
dracut.sh | 8 ++++----
|
|
||||||
2 files changed, 8 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
||||||
index b1ac9966..ab07cabf 100644
|
|
||||||
--- a/dracut-init.sh
|
|
||||||
+++ b/dracut-init.sh
|
|
||||||
@@ -154,6 +154,10 @@ dracut_no_switch_root() {
|
|
||||||
>"$initdir/lib/dracut/no-switch-root"
|
|
||||||
}
|
|
||||||
|
|
||||||
+dracut_module_path() {
|
|
||||||
+ echo ${dracutbasedir}/modules.d/??${1} | { read a b; echo "$a"; }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
if ! [[ $DRACUT_INSTALL ]]; then
|
|
||||||
DRACUT_INSTALL=$(find_binary dracut-install)
|
|
||||||
fi
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index 8144a16e..f270af76 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1373,7 +1373,7 @@ do_print_cmdline()
|
|
||||||
for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
|
|
||||||
_d_mod=${moddir##*/}; _d_mod=${_d_mod#[0-9][0-9]}
|
|
||||||
[[ ${_mods_to_print[$_d_mod]} ]] || continue
|
|
||||||
- module_cmdline "$_d_mod"
|
|
||||||
+ module_cmdline "$_d_mod" "$moddir"
|
|
||||||
done
|
|
||||||
unset moddir
|
|
||||||
}
|
|
||||||
@@ -1454,14 +1454,14 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
|
|
||||||
dinfo "*** Including module: $_d_mod ***"
|
|
||||||
fi
|
|
||||||
if [[ $kernel_only == yes ]]; then
|
|
||||||
- module_installkernel "$_d_mod" || {
|
|
||||||
+ module_installkernel "$_d_mod" "$moddir" || {
|
|
||||||
dfatal "installkernel failed in module $_d_mod"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- module_install "$_d_mod"
|
|
||||||
+ module_install "$_d_mod" "$moddir"
|
|
||||||
if [[ $no_kernel != yes ]]; then
|
|
||||||
- module_installkernel "$_d_mod" || {
|
|
||||||
+ module_installkernel "$_d_mod" "$moddir" || {
|
|
||||||
dfatal "installkernel failed in module $_d_mod"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 17cd55169c3549d85ba3e4d7e0e81c496d1b2940 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lianbo Jiang <lijiang@redhat.com>
|
|
||||||
Date: Mon, 13 May 2019 16:09:25 +0800
|
|
||||||
Subject: [PATCH] 99base: enable the initqueue in both 'dracut --add-device'
|
|
||||||
and 'dracut --mount' cases.
|
|
||||||
|
|
||||||
The commit 9f3c31cd8d68 ("99base: enable initqueue if extra devices are added")
|
|
||||||
only covers 'dracut --add-device' case, but it did not cover 'dracut --mount'
|
|
||||||
case, which causes the kdump failure in the Amazon virtual machine.
|
|
||||||
|
|
||||||
Lets make sure that the initqueue is enabled in both cases in order to wake up
|
|
||||||
the device in time.
|
|
||||||
|
|
||||||
Reported-by: Xiao Liang <xiliang@redhat.com>
|
|
||||||
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
|
||||||
(cherry picked from commit e0fc62f619ba55a96179382e22f7665e969c3d42)
|
|
||||||
|
|
||||||
Resolves: #1678094
|
|
||||||
---
|
|
||||||
modules.d/99base/module-setup.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
|
||||||
index 21523fc9..c9ead01d 100755
|
|
||||||
--- a/modules.d/99base/module-setup.sh
|
|
||||||
+++ b/modules.d/99base/module-setup.sh
|
|
||||||
@@ -93,7 +93,7 @@ install() {
|
|
||||||
|
|
||||||
## save host_devs which we need bring up
|
|
||||||
if [[ $hostonly_cmdline == "yes" ]]; then
|
|
||||||
- if [[ -n $add_device ]]; then
|
|
||||||
+ if [[ -n "${host_devs[@]}" ]]; then
|
|
||||||
dracut_need_initqueue
|
|
||||||
fi
|
|
||||||
if [[ -f "$initdir/lib/dracut/need-initqueue" ]] || ! dracut_module_included "systemd"; then
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 1851348709df5413a767faecdee908534baf0da1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 12 Jun 2019 14:27:44 +0800
|
|
||||||
Subject: [PATCH] 95fcoe: load 'libfcoe' module as a fallback
|
|
||||||
|
|
||||||
The kernel may only enable 'libfcoe' module. Some modules like bnx2fc
|
|
||||||
provides FCoE but only depend on 'libfcoe'. Loading 'fcoe' module may
|
|
||||||
fail but the kernel do support FCoE.
|
|
||||||
|
|
||||||
'libfcoe' will be installed as a dependency when installing block device
|
|
||||||
drivers if it's required. So no need to install it in installkernel.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 65fe1af2eca7d0ed340520577ab861fcd695b34a)
|
|
||||||
|
|
||||||
Resolves: #1719645
|
|
||||||
---
|
|
||||||
modules.d/95fcoe/parse-fcoe.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/95fcoe/parse-fcoe.sh b/modules.d/95fcoe/parse-fcoe.sh
|
|
||||||
index 75cca9a5..12701cdb 100755
|
|
||||||
--- a/modules.d/95fcoe/parse-fcoe.sh
|
|
||||||
+++ b/modules.d/95fcoe/parse-fcoe.sh
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
# If it's not set we don't continue
|
|
||||||
[ -z "$fcoe" ] && return
|
|
||||||
|
|
||||||
-[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
|
||||||
+[ -e /sys/bus/fcoe/ctlr_create ] || modprobe -b -a fcoe || modprobe -b -a libfcoe || die "FCoE requested but kernel/initrd does not support FCoE"
|
|
||||||
|
|
||||||
initqueue --onetime modprobe -b -q bnx2fc
|
|
||||||
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 9b2497dffb8f699ce040cdbafa967f5fe02b57b6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Fri, 2 Aug 2019 14:26:23 +0200
|
|
||||||
Subject: [PATCH] 90kernel-modules-extra: don't resolve symlinks before instmod
|
|
||||||
|
|
||||||
When you install a third-party driver, you will probably end in a
|
|
||||||
situation, where the module will be in a different directory and
|
|
||||||
in $depmod_module_dir you will only have symlink. If we resolve the
|
|
||||||
symlink before we pass the module path to instmod, the dracut-install
|
|
||||||
will only include the module with its original path, but not the
|
|
||||||
symlink. Hence the module can't be automatically loaded.
|
|
||||||
|
|
||||||
Dracut-install is clever enough to handle symlinks and will include both
|
|
||||||
the symlink and the module to the initrd.
|
|
||||||
|
|
||||||
(cherry picked from commit d1afff43aea01c8d43817adf3ac4041dd4b9f022)
|
|
||||||
|
|
||||||
Resolves: #1720275
|
|
||||||
---
|
|
||||||
modules.d/90kernel-modules-extra/module-setup.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90kernel-modules-extra/module-setup.sh b/modules.d/90kernel-modules-extra/module-setup.sh
|
|
||||||
index c0a2b7f9..1706c822 100755
|
|
||||||
--- a/modules.d/90kernel-modules-extra/module-setup.sh
|
|
||||||
+++ b/modules.d/90kernel-modules-extra/module-setup.sh
|
|
||||||
@@ -187,7 +187,7 @@ installkernel()
|
|
||||||
printf "^%s\.ko(\.gz|\.bz2|\.xz)?:\n" "${pathlist[@]}" \
|
|
||||||
| (LANG=C grep -E -o -f - -- "$depmod_modules_dep" || exit 0) \
|
|
||||||
| tr -d ':' \
|
|
||||||
- | (cd "$depmod_module_dir" || exit; xargs -r realpath -e --) \
|
|
||||||
+ | (cd "$depmod_module_dir" || exit; xargs -r realpath -se --) \
|
|
||||||
| instmods || return 1
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 3464297288b50a062e1094e57d46ad21e51b351b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 6 Aug 2019 10:54:09 +0200
|
|
||||||
Subject: [PATCH] net-lib: fix typo $li -> $_li
|
|
||||||
|
|
||||||
(cherry picked from commit cd97d8d2c0646b95aee47efd5eee39f29d617a67)
|
|
||||||
|
|
||||||
Resolves: #1625042
|
|
||||||
---
|
|
||||||
modules.d/40network/net-lib.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index f9569573..ad78d225 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -748,7 +748,7 @@ iface_has_link() {
|
|
||||||
iface_is_enslaved() {
|
|
||||||
local _li
|
|
||||||
_li=$(ip -o link show dev $1)
|
|
||||||
- strstr "$li" " master " || return 1
|
|
||||||
+ strstr "$_li" " master " || return 1
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From 95bbcaa8550534f03b332487ef3a2ed6650424fe Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
||||||
Date: Wed, 21 Aug 2019 11:16:07 +0200
|
|
||||||
Subject: [PATCH] git2spec: avoid malforming of SHA-1 hashes
|
|
||||||
|
|
||||||
When a SHA-1 hash of a specific commit is used as a tag, the regex
|
|
||||||
shenanigans later in the script can (and will) corrupt it in certain
|
|
||||||
cases.
|
|
||||||
|
|
||||||
e.g.:
|
|
||||||
$ perl -e '
|
|
||||||
$tag="6e8cd92261577230daa1098f7e05ec198c3c4281";
|
|
||||||
$tag=~s/[^0-9]+?([0-9]+)/$1/;
|
|
||||||
print("$tag\n");
|
|
||||||
'
|
|
||||||
68cd92261577230daa1098f7e05ec198c3c4281
|
|
||||||
|
|
||||||
(Notice the missing 'e')
|
|
||||||
|
|
||||||
Let's fix this by limiting the regex's scope to a non-SHA-1 tags only.
|
|
||||||
---
|
|
||||||
git2spec.pl | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/git2spec.pl b/git2spec.pl
|
|
||||||
index 7853791e..9ddc3805 100755
|
|
||||||
--- a/git2spec.pl
|
|
||||||
+++ b/git2spec.pl
|
|
||||||
@@ -37,7 +37,7 @@ $tag=`git describe --abbrev=0 --tags` if not defined $tag;
|
|
||||||
chomp($tag);
|
|
||||||
my @patches=&create_patches($tag, $pdir);
|
|
||||||
my $num=$#patches + 2;
|
|
||||||
-$tag=~s/[^0-9]+?([0-9]+)/$1/;
|
|
||||||
+$tag=~s/[^0-9]+?([0-9]+)/$1/ if $tag !~ /\b[0-9a-f]{5,40}\b/;
|
|
||||||
my $release="$num.git$datestr";
|
|
||||||
$release="1" if $num == 1;
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From d3f542cc9d0135a408be7ba995b8adad80bcd606 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
||||||
Date: Wed, 21 Aug 2019 14:06:29 +0200
|
|
||||||
Subject: [PATCH] travis: fetch only tags
|
|
||||||
|
|
||||||
The original `git pull` would try to pull & merge changes from the
|
|
||||||
master branch, which breaks CI runs on PRs based on non-master branches
|
|
||||||
---
|
|
||||||
.travis.yml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index f913db57..efb0df1b 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -29,7 +29,7 @@ before_script:
|
|
||||||
sudo modprobe kvm-intel nested=1 || :
|
|
||||||
sudo modprobe kvm-amd nested=1 || :
|
|
||||||
dmesg | tail || :
|
|
||||||
- - git pull --depth=100
|
|
||||||
+ - git fetch --tags --unshallow
|
|
||||||
- |
|
|
||||||
git describe --abbrev=0 --tags || :
|
|
||||||
git describe --tags || :
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
From e3b2b02c7f5b4e9f1d2a3cfe8749534959e29e3e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Fri, 21 Jun 2019 18:39:48 +0200
|
|
||||||
Subject: [PATCH] fs-lib: drop a bashism
|
|
||||||
|
|
||||||
Bash 5 apparently longer propagates variable assignments to local variables
|
|
||||||
in front of function calls when in POSIX mode:
|
|
||||||
|
|
||||||
[lkundrak@demiurge ~]$ cat feh.sh
|
|
||||||
print_VAR () {
|
|
||||||
echo "$VAR";
|
|
||||||
}
|
|
||||||
|
|
||||||
testfunc () {
|
|
||||||
local VAR="OLD"
|
|
||||||
VAR=NEW print_VAR
|
|
||||||
}
|
|
||||||
|
|
||||||
testfunc
|
|
||||||
[lkundrak@demiurge ~]$ bash4 --posix feh.sh
|
|
||||||
NEW
|
|
||||||
[lkundrak@demiurge ~]$ bash5 --posix feh.sh
|
|
||||||
OLD
|
|
||||||
[lkundrak@demiurge ~]$ bash5 feh.sh
|
|
||||||
NEW
|
|
||||||
[lkundrak@demiurge ~]$
|
|
||||||
|
|
||||||
It works the way it did in Bash 4 in non-POSIX mode, for external programs,
|
|
||||||
or for non-local variables. Don't ask me why -- it's probably some
|
|
||||||
compatibility thing for some sad old people.
|
|
||||||
|
|
||||||
However, this precisely happens when fsck_single() is calling into the
|
|
||||||
fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the
|
|
||||||
TEST-70-BONDBRIDGETEAMVLAN test's server and probably more.
|
|
||||||
|
|
||||||
Let's pass the fsck driver binary via the function argument instead. It's
|
|
||||||
less messy anyway.
|
|
||||||
|
|
||||||
(cherry picked from commit 43c8c4ce0471abbb8c0fc4b8be2515cebc636030)
|
|
||||||
---
|
|
||||||
modules.d/99fs-lib/fs-lib.sh | 13 +++++++------
|
|
||||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
|
|
||||||
index d39ca1b7..11e795d9 100755
|
|
||||||
--- a/modules.d/99fs-lib/fs-lib.sh
|
|
||||||
+++ b/modules.d/99fs-lib/fs-lib.sh
|
|
||||||
@@ -44,22 +44,22 @@ fsck_able() {
|
|
||||||
;;
|
|
||||||
ext?)
|
|
||||||
type e2fsck >/dev/null 2>&1 &&
|
|
||||||
- _drv="_drv=e2fsck fsck_drv_com" &&
|
|
||||||
+ _drv="fsck_drv_com e2fsck" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
f2fs)
|
|
||||||
type fsck.f2fs >/dev/null 2>&1 &&
|
|
||||||
- _drv="_drv=fsck.f2fs fsck_drv_com" &&
|
|
||||||
+ _drv="fsck_drv_com fsck.f2fs" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
jfs)
|
|
||||||
type jfs_fsck >/dev/null 2>&1 &&
|
|
||||||
- _drv="_drv=jfs_fsck fsck_drv_com" &&
|
|
||||||
+ _drv="fsck_drv_com jfs_fsck" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
reiserfs)
|
|
||||||
type reiserfsck >/dev/null 2>&1 &&
|
|
||||||
- _drv="_drv=reiserfsck fsck_drv_com" &&
|
|
||||||
+ _drv="fsck_drv_com reiserfsck" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
btrfs)
|
|
||||||
@@ -70,12 +70,12 @@ fsck_able() {
|
|
||||||
;;
|
|
||||||
nfs*)
|
|
||||||
# nfs can be a nop, returning success
|
|
||||||
- _drv="_drv=none :" &&
|
|
||||||
+ _drv=":" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
type fsck >/dev/null 2>&1 &&
|
|
||||||
- _drv="_drv=fsck fsck_drv_std" &&
|
|
||||||
+ _drv="fsck_drv_std fsck" &&
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -97,6 +97,7 @@ fsck_drv_btrfs() {
|
|
||||||
|
|
||||||
# common code for checkers that follow usual subset of options and return codes
|
|
||||||
fsck_drv_com() {
|
|
||||||
+ local _drv="$1"
|
|
||||||
local _ret
|
|
||||||
local _out
|
|
||||||
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
|||||||
From e671c3a06a7e58461d4e9c9f3546cf6eac809300 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Tue, 4 Dec 2018 10:27:17 +0100
|
|
||||||
Subject: [PATCH] 95iscsi/module-setup.sh: do not require 'hostname' anymore
|
|
||||||
|
|
||||||
(cherry picked from commit ebe1821635dd99f07c817179ee5358d27aab53c5)
|
|
||||||
|
|
||||||
[lkundrak@v3.sk: fixes TEST-30 that fails with: dracut: dracut module
|
|
||||||
'iscsi' will not be installed, because command 'hostname' could not be
|
|
||||||
found!]
|
|
||||||
---
|
|
||||||
modules.d/40network/netroot.sh | 2 +-
|
|
||||||
modules.d/95iscsi/module-setup.sh | 4 ++--
|
|
||||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
|
|
||||||
modules.d/99base/init.sh | 2 +-
|
|
||||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
|
|
||||||
index 207364cd..654cfc72 100755
|
|
||||||
--- a/modules.d/40network/netroot.sh
|
|
||||||
+++ b/modules.d/40network/netroot.sh
|
|
||||||
@@ -66,7 +66,7 @@ if [ -z "$2" ]; then
|
|
||||||
|
|
||||||
# Check: do we really know how to handle (net)root?
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
|
||||||
- [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
+ [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
handler=${netroot%%:*}
|
|
||||||
handler=${handler%%4}
|
|
||||||
diff --git a/modules.d/95iscsi/module-setup.sh b/modules.d/95iscsi/module-setup.sh
|
|
||||||
index 79af4a47..f6f3520d 100755
|
|
||||||
--- a/modules.d/95iscsi/module-setup.sh
|
|
||||||
+++ b/modules.d/95iscsi/module-setup.sh
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
check() {
|
|
||||||
local _rootdev
|
|
||||||
# If our prerequisites are not met, fail anyways.
|
|
||||||
- require_binaries hostname iscsi-iname iscsiadm iscsid || return 1
|
|
||||||
+ require_binaries iscsi-iname iscsiadm iscsid || return 1
|
|
||||||
|
|
||||||
# If hostonly was requested, fail the check if we are not actually
|
|
||||||
# booting from root.
|
|
||||||
@@ -206,7 +206,7 @@ cmdline() {
|
|
||||||
install() {
|
|
||||||
inst_multiple -o iscsiuio
|
|
||||||
inst_libdir_file 'libgcc_s.so*'
|
|
||||||
- inst_multiple umount hostname iscsi-iname iscsiadm iscsid
|
|
||||||
+ inst_multiple umount iscsi-iname iscsiadm iscsid
|
|
||||||
|
|
||||||
inst_multiple -o \
|
|
||||||
$systemdsystemunitdir/iscsid.socket \
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
index bff9435a..89c52d13 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
@@ -76,7 +76,7 @@ case "${root}${root_unset}" in
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ -z "${root}${root_unset}" ] && die "Empty root= argument"
|
|
||||||
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
+[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
export root rflags fstype netroot NEWROOT
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
||||||
index e4f7cff1..3e20069f 100755
|
|
||||||
--- a/modules.d/99base/init.sh
|
|
||||||
+++ b/modules.d/99base/init.sh
|
|
||||||
@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br
|
|
||||||
source_hook cmdline
|
|
||||||
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
|
||||||
-[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
+[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
export root rflags fstype netroot NEWROOT
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 50192de38d756203a414405e2d7552e89b1c0423 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Tue, 4 Dec 2018 10:06:12 +0100
|
|
||||||
Subject: [PATCH] test/test-functions: correctly move server.log
|
|
||||||
|
|
||||||
(cherry picked from commit 712f471ebfae70fd71c0c740e9a3e120464ca7e7)
|
|
||||||
---
|
|
||||||
test/test-functions | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/test/test-functions b/test/test-functions
|
|
||||||
index a6254ec7..51b3df80 100644
|
|
||||||
--- a/test/test-functions
|
|
||||||
+++ b/test/test-functions
|
|
||||||
@@ -80,7 +80,7 @@ while (($# > 0)); do
|
|
||||||
ret=$?
|
|
||||||
test_cleanup
|
|
||||||
if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then
|
|
||||||
- mv [[ -f "$TESTDIR"/server.log ]] ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log
|
|
||||||
+ mv "$TESTDIR"/server.log ./server${TEST_RUN_ID:+-$TEST_RUN_ID}.log
|
|
||||||
fi
|
|
||||||
rm -fr -- "$TESTDIR"
|
|
||||||
rm -f -- .testdir${TEST_RUN_ID:+-$TEST_RUN_ID}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From bf69beb6f3824b1ebed221c8255d1f5c9efd136a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Wed, 26 Jun 2019 16:42:04 +0200
|
|
||||||
Subject: [PATCH] test/TEST-17-LVM-THIN: fail setup if we run out of space in
|
|
||||||
the thin pool
|
|
||||||
|
|
||||||
This condition is rather difficult to detect -- the writes will just remain
|
|
||||||
queued and get lost on shutdown, resulting in a corrupt filesystem.
|
|
||||||
|
|
||||||
(cherry picked from commit 91c15babdf0215df59325f3086acfdf0ba247bfa)
|
|
||||||
---
|
|
||||||
test/TEST-17-LVM-THIN/create-root.sh | 5 +++--
|
|
||||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
|
||||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
index 117d1341..0e52f879 100755
|
|
||||||
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
@@ -27,6 +27,7 @@ cp -a -t /sysroot /source/* && \
|
|
||||||
umount /sysroot && \
|
|
||||||
sleep 1 && \
|
|
||||||
lvm lvchange -a n /dev/dracut/root && \
|
|
||||||
-sleep 1 && \
|
|
||||||
-echo "dracut-root-block-created" >/dev/sda1
|
|
||||||
+sleep 1
|
|
||||||
+dmsetup status |grep out_of_data_space || \
|
|
||||||
+ echo "dracut-root-block-created" >/dev/sda1
|
|
||||||
poweroff -f
|
|
||||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
index af349246..1b36a216 100755
|
|
||||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
@@ -56,7 +56,7 @@ test_setup() {
|
|
||||||
(
|
|
||||||
export initdir=$TESTDIR/overlay
|
|
||||||
. $basedir/dracut-init.sh
|
|
||||||
- inst_multiple sfdisk mke2fs poweroff cp umount
|
|
||||||
+ inst_multiple sfdisk mke2fs poweroff cp umount grep dmsetup
|
|
||||||
inst_hook initqueue 01 ./create-root.sh
|
|
||||||
inst_hook initqueue/finished 01 ./finished-false.sh
|
|
||||||
inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
|||||||
From 0f0b8c8f90cbcd56140e85b9997deda906c71118 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Tue, 25 Jun 2019 17:39:57 +0200
|
|
||||||
Subject: [PATCH] test/TEST-14-IMSM: detect failure to compose the test setup
|
|
||||||
root
|
|
||||||
|
|
||||||
The dracut-root-block-created line should not be created if we fail to copy
|
|
||||||
in the required files to sysroot. Let's turn on -e to trap failures and
|
|
||||||
poweroff on them, like some other tests do.
|
|
||||||
|
|
||||||
Also remove the &&. Not only it is unnecessary with -e, but defeats it.
|
|
||||||
From bash(1):
|
|
||||||
|
|
||||||
The shell does not exit if the command that fails is [...] part of any
|
|
||||||
command executed in a && or || list except the command following the
|
|
||||||
final && or || [...]
|
|
||||||
|
|
||||||
(cherry picked from commit c27ed38bb2986d31b08257782ce2b24a80415c6c)
|
|
||||||
---
|
|
||||||
test/TEST-14-IMSM/create-root.sh | 23 +++++++++++++----------
|
|
||||||
1 file changed, 13 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh
|
|
||||||
index f637ec88..a0324c6f 100755
|
|
||||||
--- a/test/TEST-14-IMSM/create-root.sh
|
|
||||||
+++ b/test/TEST-14-IMSM/create-root.sh
|
|
||||||
@@ -1,4 +1,7 @@
|
|
||||||
#!/bin/sh
|
|
||||||
+
|
|
||||||
+trap 'poweroff -f' EXIT
|
|
||||||
+
|
|
||||||
# don't let udev and this script step on eachother's toes
|
|
||||||
for x in 61-dmraid-imsm.rules 64-md-raid.rules 65-md-incremental-imsm.rules 65-md-incremental.rules 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
|
|
||||||
rm -f -- "/etc/udev/rules.d/$x"
|
|
||||||
@@ -55,20 +58,20 @@ mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 \
|
|
||||||
# wait for the array to finish initailizing, otherwise this sometimes fails
|
|
||||||
# randomly.
|
|
||||||
mdadm -W /dev/md0
|
|
||||||
+set -e
|
|
||||||
lvm pvcreate -ff -y /dev/md0
|
|
||||||
-lvm vgcreate dracut /dev/md0 && \
|
|
||||||
-lvm lvcreate -l 100%FREE -n root dracut && \
|
|
||||||
-lvm vgchange -ay && \
|
|
||||||
-mke2fs -L root /dev/dracut/root && \
|
|
||||||
-mkdir -p /sysroot && \
|
|
||||||
-mount /dev/dracut/root /sysroot && \
|
|
||||||
-cp -a -t /sysroot /source/* && \
|
|
||||||
-umount /sysroot && \
|
|
||||||
-lvm lvchange -a n /dev/dracut/root && \
|
|
||||||
+lvm vgcreate dracut /dev/md0
|
|
||||||
+lvm lvcreate -l 100%FREE -n root dracut
|
|
||||||
+lvm vgchange -ay
|
|
||||||
+mke2fs -L root /dev/dracut/root
|
|
||||||
+mkdir -p /sysroot
|
|
||||||
+mount /dev/dracut/root /sysroot
|
|
||||||
+cp -a -t /sysroot /source/*
|
|
||||||
+umount /sysroot
|
|
||||||
+lvm lvchange -a n /dev/dracut/root
|
|
||||||
udevadm settle
|
|
||||||
mdadm --detail --export /dev/md0 |grep -F MD_UUID > /tmp/mduuid
|
|
||||||
. /tmp/mduuid
|
|
||||||
echo "MD_UUID=$MD_UUID"
|
|
||||||
{ echo "dracut-root-block-created"; echo MD_UUID=$MD_UUID;} > /dev/sda
|
|
||||||
mdadm --wait-clean /dev/md0
|
|
||||||
-poweroff -f
|
|
||||||
|
|
@ -1,346 +0,0 @@
|
|||||||
From e35e43c1c28a8935660fe72650614e5dc1defb65 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Wed, 26 Jun 2019 11:47:21 +0200
|
|
||||||
Subject: [PATCH] test: tell systemd to reboot on fatal errors
|
|
||||||
|
|
||||||
Otherwise systemd would freeze execution, causing the test to time out
|
|
||||||
instead of failing fast.
|
|
||||||
|
|
||||||
(cherry picked from commit 7934c6f918de2e82d0df5da557c5792c4fb7b798)
|
|
||||||
---
|
|
||||||
test/TEST-01-BASIC/test.sh | 2 +-
|
|
||||||
test/TEST-02-SYSTEMD/test.sh | 2 +-
|
|
||||||
test/TEST-03-USR-MOUNT/test.sh | 2 +-
|
|
||||||
test/TEST-04-FULL-SYSTEMD/test.sh | 2 +-
|
|
||||||
test/TEST-10-RAID/test.sh | 2 +-
|
|
||||||
test/TEST-11-LVM/test.sh | 2 +-
|
|
||||||
test/TEST-12-RAID-DEG/test.sh | 2 +-
|
|
||||||
test/TEST-13-ENC-RAID-LVM/test.sh | 6 +++---
|
|
||||||
test/TEST-14-IMSM/test.sh | 2 +-
|
|
||||||
test/TEST-15-BTRFSRAID/test.sh | 2 +-
|
|
||||||
test/TEST-16-DMSQUASH/test.sh | 2 +-
|
|
||||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
|
||||||
test/TEST-20-NFS/test.sh | 4 ++--
|
|
||||||
test/TEST-30-ISCSI/test.sh | 4 ++--
|
|
||||||
test/TEST-31-ISCSI-MULTI/test.sh | 4 ++--
|
|
||||||
test/TEST-40-NBD/test.sh | 4 ++--
|
|
||||||
test/TEST-50-MULTINIC/test.sh | 4 ++--
|
|
||||||
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 6 +++---
|
|
||||||
18 files changed, 27 insertions(+), 27 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-01-BASIC/test.sh b/test/TEST-01-BASIC/test.sh
|
|
||||||
index ed2ae5de..ca4a8288 100755
|
|
||||||
--- a/test/TEST-01-BASIC/test.sh
|
|
||||||
+++ b/test/TEST-01-BASIC/test.sh
|
|
||||||
@@ -15,7 +15,7 @@ test_run() {
|
|
||||||
-net none \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing || return 1
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/result || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh
|
|
||||||
index 8c5eb168..848021e5 100755
|
|
||||||
--- a/test/TEST-02-SYSTEMD/test.sh
|
|
||||||
+++ b/test/TEST-02-SYSTEMD/test.sh
|
|
||||||
@@ -11,7 +11,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext3 || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-03-USR-MOUNT/test.sh b/test/TEST-03-USR-MOUNT/test.sh
|
|
||||||
index 42c0da65..5d5ec8f8 100755
|
|
||||||
--- a/test/TEST-03-USR-MOUNT/test.sh
|
|
||||||
+++ b/test/TEST-03-USR-MOUNT/test.sh
|
|
||||||
@@ -22,7 +22,7 @@ client_run() {
|
|
||||||
-net none \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
|
|
||||||
if (($? != 0)); then
|
|
||||||
diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
||||||
index 97528e4f..f65f30f2 100755
|
|
||||||
--- a/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
||||||
+++ b/test/TEST-04-FULL-SYSTEMD/test.sh
|
|
||||||
@@ -23,7 +23,7 @@ client_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
|
|
||||||
if (($? != 0)); then
|
|
||||||
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
|
|
||||||
index 444126b2..0beb26c3 100755
|
|
||||||
--- a/test/TEST-10-RAID/test.sh
|
|
||||||
+++ b/test/TEST-10-RAID/test.sh
|
|
||||||
@@ -13,7 +13,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $DISKIMAGE || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-11-LVM/test.sh b/test/TEST-11-LVM/test.sh
|
|
||||||
index 5c105e01..a907c4b1 100755
|
|
||||||
--- a/test/TEST-11-LVM/test.sh
|
|
||||||
+++ b/test/TEST-11-LVM/test.sh
|
|
||||||
@@ -12,7 +12,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
index 4e381d84..c82cde1e 100755
|
|
||||||
--- a/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
+++ b/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
@@ -20,7 +20,7 @@ client_run() {
|
|
||||||
-drive format=raw,index=3,media=disk,file=$TESTDIR/disk3.img.new \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot $* systemd.log_target=kmsg loglevel=7 root=LABEL=root rw rd.retry=20 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.debug rd.shell=0 $DEBUGFAIL " \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
|
|
||||||
echo "CLIENT TEST END: $@ [FAIL]"
|
|
||||||
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
index 76ec36b3..99324ce9 100755
|
|
||||||
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
@@ -20,7 +20,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1
|
|
||||||
echo "CLIENT TEST END: [OK]"
|
|
||||||
@@ -34,7 +34,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img || return 1
|
|
||||||
echo "CLIENT TEST END: [OK]"
|
|
||||||
@@ -48,7 +48,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/check-success.img && return 1
|
|
||||||
echo "CLIENT TEST END: [OK]"
|
|
||||||
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
|
||||||
index 8ebc285a..ed60f052 100755
|
|
||||||
--- a/test/TEST-14-IMSM/test.sh
|
|
||||||
+++ b/test/TEST-14-IMSM/test.sh
|
|
||||||
@@ -16,7 +16,7 @@ client_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
if ! grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2; then
|
|
||||||
echo "CLIENT TEST END: $@ [FAIL]"
|
|
||||||
diff --git a/test/TEST-15-BTRFSRAID/test.sh b/test/TEST-15-BTRFSRAID/test.sh
|
|
||||||
index 02cb4976..dda76672 100755
|
|
||||||
--- a/test/TEST-15-BTRFSRAID/test.sh
|
|
||||||
+++ b/test/TEST-15-BTRFSRAID/test.sh
|
|
||||||
@@ -15,7 +15,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $MARKER_DISKIMAGE || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-16-DMSQUASH/test.sh b/test/TEST-16-DMSQUASH/test.sh
|
|
||||||
index 45d8c4c0..65d5bdbb 100755
|
|
||||||
--- a/test/TEST-16-DMSQUASH/test.sh
|
|
||||||
+++ b/test/TEST-16-DMSQUASH/test.sh
|
|
||||||
@@ -23,7 +23,7 @@ test_run() {
|
|
||||||
-nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=live:CDLABEL=LiveCD live rw quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.testing
|
|
||||||
|
|
||||||
# mediacheck test with qemu GUI
|
|
||||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
index 1b36a216..c13e9063 100755
|
|
||||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
@@ -12,7 +12,7 @@ test_run() {
|
|
||||||
-m 512M -smp 2 -nographic \
|
|
||||||
-net none \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
grep -F -m 1 -q dracut-root-block-success $TESTDIR/root.ext2 || return 1
|
|
||||||
}
|
|
||||||
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh
|
|
||||||
index e942745a..4ad7fd77 100755
|
|
||||||
--- a/test/TEST-20-NFS/test.sh
|
|
||||||
+++ b/test/TEST-20-NFS/test.sh
|
|
||||||
@@ -22,7 +22,7 @@ run_server() {
|
|
||||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
|
||||||
-initrd $TESTDIR/initramfs.server \
|
|
||||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
|
||||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
|
||||||
@@ -57,7 +57,7 @@ client_test() {
|
|
||||||
-net socket,connect=127.0.0.1:12320 \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.debug rd.retry=10 rd.info quiet ro console=ttyS0,115200n81 selinux=0" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK $TESTDIR/client.img; then
|
|
||||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
|
||||||
index f6cc56d5..d5a6ba58 100755
|
|
||||||
--- a/test/TEST-30-ISCSI/test.sh
|
|
||||||
+++ b/test/TEST-30-ISCSI/test.sh
|
|
||||||
@@ -26,7 +26,7 @@ run_server() {
|
|
||||||
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
|
|
||||||
-net socket,listen=127.0.0.1:12330 \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
|
||||||
-initrd $TESTDIR/initramfs.server \
|
|
||||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
|
||||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
|
||||||
@@ -51,7 +51,7 @@ run_client() {
|
|
||||||
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
|
||||||
-net socket,connect=127.0.0.1:12330 \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
|
||||||
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
|
||||||
diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
index 5c38249c..20db2451 100755
|
|
||||||
--- a/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
+++ b/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
@@ -26,7 +26,7 @@ run_server() {
|
|
||||||
-net nic,macaddr=52:54:00:12:34:57,model=e1000 \
|
|
||||||
-net socket,listen=127.0.0.1:12331 \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 $SERVER_DEBUG" \
|
|
||||||
-initrd $TESTDIR/initramfs.server \
|
|
||||||
-pidfile $TESTDIR/server.pid -daemonize || return 1
|
|
||||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
|
||||||
@@ -51,7 +51,7 @@ run_client() {
|
|
||||||
-net nic,macaddr=52:54:00:12:34:01,model=e1000 \
|
|
||||||
-net socket,connect=127.0.0.1:12331 \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
if ! grep -F -m 1 -q iscsi-OK $TESTDIR/client.img; then
|
|
||||||
echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
|
||||||
diff --git a/test/TEST-40-NBD/test.sh b/test/TEST-40-NBD/test.sh
|
|
||||||
index 12736a15..19ec5b0e 100755
|
|
||||||
--- a/test/TEST-40-NBD/test.sh
|
|
||||||
+++ b/test/TEST-40-NBD/test.sh
|
|
||||||
@@ -28,7 +28,7 @@ run_server() {
|
|
||||||
${SERIAL:+-serial "$SERIAL"} \
|
|
||||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot root=/dev/sda rootfstype=ext2 rw quiet console=ttyS0,115200n81 selinux=0" \
|
|
||||||
-initrd $TESTDIR/initramfs.server -pidfile $TESTDIR/server.pid -daemonize || return 1
|
|
||||||
sudo chmod 644 $TESTDIR/server.pid || return 1
|
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ client_test() {
|
|
||||||
-net nic,macaddr=$mac,model=e1000 \
|
|
||||||
-net socket,connect=127.0.0.1:12340 \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.auto rd.info rd.retry=10 ro console=ttyS0,115200n81 selinux=0 " \
|
|
||||||
-initrd $TESTDIR/initramfs.testing
|
|
||||||
|
|
||||||
if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK $TESTDIR/flag.img; then
|
|
||||||
diff --git a/test/TEST-50-MULTINIC/test.sh b/test/TEST-50-MULTINIC/test.sh
|
|
||||||
index 495a66f2..ff2961dc 100755
|
|
||||||
--- a/test/TEST-50-MULTINIC/test.sh
|
|
||||||
+++ b/test/TEST-50-MULTINIC/test.sh
|
|
||||||
@@ -23,7 +23,7 @@ run_server() {
|
|
||||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.server \
|
|
||||||
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ client_test() {
|
|
||||||
-device e1000,netdev=n2,mac=52:54:00:12:34:99 \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot rd.shell=0 $cmdline $DEBUGFAIL rd.retry=5 ro console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.debug systemd.log_target=console loglevel=7" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.testing
|
|
||||||
|
|
||||||
{ read OK; read IFACES; } < "$TESTDIR"/client.img
|
|
||||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
index 8c11a7d3..5618baee 100755
|
|
||||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
@@ -31,7 +31,7 @@ run_server() {
|
|
||||||
${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.server \
|
|
||||||
-pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
|
||||||
chmod 644 -- "$TESTDIR"/server.pid || return 1
|
|
||||||
@@ -79,7 +79,7 @@ client_test() {
|
|
||||||
$nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.testing
|
|
||||||
else
|
|
||||||
$testdir/run-qemu \
|
|
||||||
@@ -95,7 +95,7 @@ client_test() {
|
|
||||||
-net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \
|
|
||||||
-watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
-no-reboot \
|
|
||||||
- -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
+ -append "panic=1 systemd.crash_reboot $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
-initrd "$TESTDIR"/initramfs.testing
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,229 +0,0 @@
|
|||||||
From a34b1baa6ca45b420399ec4cefe3cfe225c14dcf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Tue, 11 Jun 2019 09:56:13 +0200
|
|
||||||
Subject: [PATCH] test/{10,12,13,14,17,30,31}: increase the disk sizes
|
|
||||||
|
|
||||||
On Fedora 30 the paritition sizes turn out to be too small again:
|
|
||||||
|
|
||||||
+ mkdir -p /sysroot
|
|
||||||
+ mount /dev/dracut/root /sysroot
|
|
||||||
+ cp -a -t /sysroot /source/bin /source/dev /source/etc /source/lib /source/lib64 /source/proc /source/root /source/sbin /source/sys /source/tmp /source/usr /source/var
|
|
||||||
cp: error writing '/sysroot/usr/lib64/libkrb5.so.3.3': No space left on device
|
|
||||||
cp: error writing '/sysroot/usr/lib64/libkrb5support.so.0.1': No space left on device
|
|
||||||
|
|
||||||
It turns out that there has been quite some size increase in some libraries,
|
|
||||||
notably glibc, though not all -- some even shrunk, ruling out a toolchain
|
|
||||||
problem. Here's are files over 1M we install on Fedora 30:
|
|
||||||
|
|
||||||
f29 f30
|
|
||||||
2.7M => 6.4M /usr/lib64/{libc-2.28.so => libc-2.29.so}
|
|
||||||
3.1M => 6.0M /usr/lib64/libcrypto.so.1.1.1c
|
|
||||||
2.0M => 3.5M /usr/lib64/{libm-2.28.so => libm-2.29.so}
|
|
||||||
2.9M => 2.8M /usr/lib/systemd/{libsystemd-shared-239.so => libsystemd-shared-241.so}
|
|
||||||
1.7M => 2.5M /usr/lib64/libunistring.so.2.1.0
|
|
||||||
2.3M => 2.4M /usr/lib64/bind9-export/libdns-export.so.1105.0.0
|
|
||||||
1.2M => 2.1M /usr/bin/bash
|
|
||||||
1.1M => 1.4M /usr/lib64/libkrb5.so.3.3
|
|
||||||
1.2M => 1.4M /usr/lib64/libgcrypt.so.20.2.4
|
|
||||||
612K => 1.1M /usr/lib64/libssl.so.1.1.1c
|
|
||||||
|
|
||||||
This increases the image sizes to accomodate for this. There's probably
|
|
||||||
little else we can do.
|
|
||||||
|
|
||||||
(cherry picked from commit e318ba30fbd84d510a5bbb071d868e523d965869)
|
|
||||||
---
|
|
||||||
test/TEST-10-RAID/create-root.sh | 6 +++---
|
|
||||||
test/TEST-10-RAID/test.sh | 2 +-
|
|
||||||
test/TEST-12-RAID-DEG/test.sh | 6 +++---
|
|
||||||
test/TEST-13-ENC-RAID-LVM/create-root.sh | 6 +++---
|
|
||||||
test/TEST-13-ENC-RAID-LVM/test.sh | 2 +-
|
|
||||||
test/TEST-14-IMSM/create-root.sh | 6 +++---
|
|
||||||
test/TEST-14-IMSM/test.sh | 4 ++--
|
|
||||||
test/TEST-17-LVM-THIN/create-root.sh | 8 ++++----
|
|
||||||
test/TEST-17-LVM-THIN/test.sh | 2 +-
|
|
||||||
test/TEST-30-ISCSI/test.sh | 6 +++---
|
|
||||||
test/TEST-31-ISCSI-MULTI/test.sh | 6 +++---
|
|
||||||
11 files changed, 27 insertions(+), 27 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-10-RAID/create-root.sh b/test/TEST-10-RAID/create-root.sh
|
|
||||||
index 7b5f2a76..af4cac0d 100755
|
|
||||||
--- a/test/TEST-10-RAID/create-root.sh
|
|
||||||
+++ b/test/TEST-10-RAID/create-root.sh
|
|
||||||
@@ -8,9 +8,9 @@ udevadm control --reload
|
|
||||||
# save a partition at the beginning for future flagging purposes
|
|
||||||
sfdisk /dev/sda <<EOF
|
|
||||||
,4M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
+,41M
|
|
||||||
+,41M
|
|
||||||
+,41M
|
|
||||||
EOF
|
|
||||||
udevadm settle
|
|
||||||
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4
|
|
||||||
diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh
|
|
||||||
index 0beb26c3..07179a29 100755
|
|
||||||
--- a/test/TEST-10-RAID/test.sh
|
|
||||||
+++ b/test/TEST-10-RAID/test.sh
|
|
||||||
@@ -22,7 +22,7 @@ test_setup() {
|
|
||||||
DISKIMAGE=$TESTDIR/TEST-10-RAID-root.img
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
rm -f -- $DISKIMAGE
|
|
||||||
- dd if=/dev/null of=$DISKIMAGE bs=1M seek=80
|
|
||||||
+ dd if=/dev/null of=$DISKIMAGE bs=1M seek=128
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-12-RAID-DEG/test.sh b/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
index c82cde1e..920baafd 100755
|
|
||||||
--- a/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
+++ b/test/TEST-12-RAID-DEG/test.sh
|
|
||||||
@@ -59,9 +59,9 @@ test_setup() {
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
rm -f -- $TESTDIR/root.ext2
|
|
||||||
dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=40
|
|
||||||
- dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=20
|
|
||||||
- dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=20
|
|
||||||
- dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=20
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/disk1.img bs=1M seek=35
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/disk2.img bs=1M seek=35
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/disk3.img bs=1M seek=35
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-13-ENC-RAID-LVM/create-root.sh b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
||||||
index 72bc765f..13e65838 100755
|
|
||||||
--- a/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
||||||
+++ b/test/TEST-13-ENC-RAID-LVM/create-root.sh
|
|
||||||
@@ -9,9 +9,9 @@ udevadm control --reload
|
|
||||||
# save a partition at the beginning for future flagging purposes
|
|
||||||
sfdisk /dev/sda <<EOF
|
|
||||||
,4M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
+,43M
|
|
||||||
+,43M
|
|
||||||
+,43M
|
|
||||||
EOF
|
|
||||||
udevadm settle
|
|
||||||
printf test >keyfile
|
|
||||||
diff --git a/test/TEST-13-ENC-RAID-LVM/test.sh b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
index 99324ce9..9ffe24b1 100755
|
|
||||||
--- a/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
+++ b/test/TEST-13-ENC-RAID-LVM/test.sh
|
|
||||||
@@ -59,7 +59,7 @@ test_run() {
|
|
||||||
test_setup() {
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
rm -f -- $TESTDIR/root.ext2
|
|
||||||
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=134
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-14-IMSM/create-root.sh b/test/TEST-14-IMSM/create-root.sh
|
|
||||||
index a0324c6f..0d10945b 100755
|
|
||||||
--- a/test/TEST-14-IMSM/create-root.sh
|
|
||||||
+++ b/test/TEST-14-IMSM/create-root.sh
|
|
||||||
@@ -32,9 +32,9 @@ sfdisk -g /dev/mapper/isw*Test0
|
|
||||||
# save a partition at the beginning for future flagging purposes
|
|
||||||
sfdisk --no-reread /dev/mapper/isw*Test0 <<EOF
|
|
||||||
,4M
|
|
||||||
-,20M
|
|
||||||
-,20M
|
|
||||||
-,20M
|
|
||||||
+,28M
|
|
||||||
+,28M
|
|
||||||
+,28M
|
|
||||||
EOF
|
|
||||||
|
|
||||||
udevadm settle
|
|
||||||
diff --git a/test/TEST-14-IMSM/test.sh b/test/TEST-14-IMSM/test.sh
|
|
||||||
index ed60f052..a3e52b53 100755
|
|
||||||
--- a/test/TEST-14-IMSM/test.sh
|
|
||||||
+++ b/test/TEST-14-IMSM/test.sh
|
|
||||||
@@ -53,8 +53,8 @@ test_setup() {
|
|
||||||
rm -f -- $TESTDIR/disk1
|
|
||||||
rm -f -- $TESTDIR/disk2
|
|
||||||
dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=1
|
|
||||||
- dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=80
|
|
||||||
- dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=80
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/disk1 bs=1M seek=104
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/disk2 bs=1M seek=104
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-17-LVM-THIN/create-root.sh b/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
index 0e52f879..6e09012e 100755
|
|
||||||
--- a/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
+++ b/test/TEST-17-LVM-THIN/create-root.sh
|
|
||||||
@@ -8,16 +8,16 @@ udevadm control --reload
|
|
||||||
# save a partition at the beginning for future flagging purposes
|
|
||||||
sfdisk /dev/sda <<EOF
|
|
||||||
,4M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
-,25M
|
|
||||||
+,29M
|
|
||||||
+,29M
|
|
||||||
+,29M
|
|
||||||
EOF
|
|
||||||
udevadm settle
|
|
||||||
for i in sda2 sda3 sda4; do
|
|
||||||
lvm pvcreate -ff -y /dev/$i ;
|
|
||||||
done && \
|
|
||||||
lvm vgcreate dracut /dev/sda[234] && \
|
|
||||||
-lvm lvcreate -l 16 -T dracut/mythinpool && \
|
|
||||||
+lvm lvcreate -l 17 -T dracut/mythinpool && \
|
|
||||||
lvm lvcreate -V1G -T dracut/mythinpool -n root && \
|
|
||||||
lvm vgchange -ay && \
|
|
||||||
mke2fs /dev/dracut/root && \
|
|
||||||
diff --git a/test/TEST-17-LVM-THIN/test.sh b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
index c13e9063..c7247c91 100755
|
|
||||||
--- a/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
+++ b/test/TEST-17-LVM-THIN/test.sh
|
|
||||||
@@ -19,7 +19,7 @@ test_run() {
|
|
||||||
|
|
||||||
test_setup() {
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
- dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=80
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/root.ext2 bs=1M seek=92
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-30-ISCSI/test.sh b/test/TEST-30-ISCSI/test.sh
|
|
||||||
index d5a6ba58..c126e3dd 100755
|
|
||||||
--- a/test/TEST-30-ISCSI/test.sh
|
|
||||||
+++ b/test/TEST-30-ISCSI/test.sh
|
|
||||||
@@ -109,9 +109,9 @@ test_setup() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
|
||||||
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
|
||||||
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
diff --git a/test/TEST-31-ISCSI-MULTI/test.sh b/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
index 20db2451..122c69e3 100755
|
|
||||||
--- a/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
+++ b/test/TEST-31-ISCSI-MULTI/test.sh
|
|
||||||
@@ -131,9 +131,9 @@ test_setup() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create the blank file to use as a root filesystem
|
|
||||||
- dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
|
||||||
- dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
|
||||||
- dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=45
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=45
|
|
||||||
+ dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=45
|
|
||||||
|
|
||||||
kernel=$KVERSION
|
|
||||||
# Create what will eventually be our root filesystem onto an overlay
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From d9bf0c38be49199724abe1d18bc1c2686e6f0c88 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Thu, 27 Jun 2019 16:20:32 +0200
|
|
||||||
Subject: [PATCH] travis: run TEST-14-IMSM on Fedora 29
|
|
||||||
|
|
||||||
Systemd in Fedora 30 is broken at the moment.
|
|
||||||
Fix: https://github.com/systemd/systemd/pull/12872/
|
|
||||||
|
|
||||||
(cherry picked from commit 7a2503ab8cec9473ad6dacf4f48b17344219f3c0)
|
|
||||||
---
|
|
||||||
.travis.yml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index efb0df1b..de0af438 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -19,7 +19,7 @@ env:
|
|
||||||
- IMAGE=latest TESTS=10
|
|
||||||
- IMAGE=latest TESTS=11
|
|
||||||
- IMAGE=latest TESTS=13
|
|
||||||
- - IMAGE=latest TESTS=14
|
|
||||||
+ - IMAGE=29 TESTS=14
|
|
||||||
- IMAGE=latest TESTS=15
|
|
||||||
- IMAGE=latest TESTS=17
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From c60f4fc027272c221a887128070ac89547b6ecc3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Thu, 27 Jun 2019 16:22:04 +0200
|
|
||||||
Subject: [PATCH] travis: run TEST-13-ENC-RAID-LVM on Fedora 29
|
|
||||||
|
|
||||||
Systemd in Fedora 30 is broken at the moment.
|
|
||||||
Fix: https://github.com/systemd/systemd/pull/12897
|
|
||||||
|
|
||||||
(cherry picked from commit 8238f41b34777c3c75b03a9b598d4b9e1c7bf911)
|
|
||||||
---
|
|
||||||
.travis.yml | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index de0af438..364078cf 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -18,7 +18,7 @@ env:
|
|
||||||
- IMAGE=latest TESTS=04
|
|
||||||
- IMAGE=latest TESTS=10
|
|
||||||
- IMAGE=latest TESTS=11
|
|
||||||
- - IMAGE=latest TESTS=13
|
|
||||||
+ - IMAGE=29 TESTS=13
|
|
||||||
- IMAGE=29 TESTS=14
|
|
||||||
- IMAGE=latest TESTS=15
|
|
||||||
- IMAGE=latest TESTS=17
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From d8f0e52ac7d05c364ca24d2058c970e5e03f82ff Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Fri, 30 Aug 2019 16:16:51 +0200
|
|
||||||
Subject: [PATCH] all: remove debugging leftovers
|
|
||||||
|
|
||||||
Accidentally folded into commit e671c3a06a7e5 ('95iscsi/module-setup.sh:
|
|
||||||
do not require 'hostname' anymore').
|
|
||||||
---
|
|
||||||
modules.d/40network/netroot.sh | 2 +-
|
|
||||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
|
|
||||||
modules.d/99base/init.sh | 2 +-
|
|
||||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/netroot.sh b/modules.d/40network/netroot.sh
|
|
||||||
index 654cfc72..207364cd 100755
|
|
||||||
--- a/modules.d/40network/netroot.sh
|
|
||||||
+++ b/modules.d/40network/netroot.sh
|
|
||||||
@@ -66,7 +66,7 @@ if [ -z "$2" ]; then
|
|
||||||
|
|
||||||
# Check: do we really know how to handle (net)root?
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
|
||||||
- [ -z "$rootok" ] && die "X2 Don't know how to handle 'root=$root'"
|
|
||||||
+ [ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
handler=${netroot%%:*}
|
|
||||||
handler=${handler%%4}
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
index 89c52d13..bff9435a 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
@@ -76,7 +76,7 @@ case "${root}${root_unset}" in
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ -z "${root}${root_unset}" ] && die "Empty root= argument"
|
|
||||||
-[ -z "$rootok" ] && die "X1 Don't know how to handle 'root=$root'"
|
|
||||||
+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
export root rflags fstype netroot NEWROOT
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
||||||
index 3e20069f..e4f7cff1 100755
|
|
||||||
--- a/modules.d/99base/init.sh
|
|
||||||
+++ b/modules.d/99base/init.sh
|
|
||||||
@@ -136,7 +136,7 @@ getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Br
|
|
||||||
source_hook cmdline
|
|
||||||
|
|
||||||
[ -z "$root" ] && die "No or empty root= argument"
|
|
||||||
-[ -z "$rootok" ] && die "X0 Don't know how to handle 'root=$root'"
|
|
||||||
+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
|
|
||||||
|
|
||||||
export root rflags fstype netroot NEWROOT
|
|
||||||
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 8eb08e55286e77f005246d1db1bfd2adf4a0e40b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Tue, 27 Nov 2018 15:30:48 +0100
|
|
||||||
Subject: [PATCH] network-manager: call the online hook for connected devices
|
|
||||||
|
|
||||||
Look for "connection-uuid" instead of "managed" to determine the devices
|
|
||||||
that are actually activated with a connection and call the online hook.
|
|
||||||
|
|
||||||
This fixes the anaconda-net root mount, which utilizes the online hook.
|
|
||||||
|
|
||||||
(cherry picked from commit 79a17b0112995eb60c85c64d15070c52f213b28d)
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-run.sh | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index f6defa99..0f943631 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -9,8 +9,9 @@ fi
|
|
||||||
for _i in /sys/class/net/*/
|
|
||||||
do
|
|
||||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
|
||||||
- grep -q managed=true $state 2>/dev/null || continue
|
|
||||||
+ grep -q connection-uuid= $state 2>/dev/null || continue
|
|
||||||
ifname=$(basename $_i)
|
|
||||||
sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
|
||||||
+ source_hook initqueue/online $ifname
|
|
||||||
/sbin/netroot $ifname
|
|
||||||
done
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 34011ee53e745f74d70bc5b52dade6d4ef349e90 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 17 Jun 2019 10:07:38 +0200
|
|
||||||
Subject: [PATCH] network-manager: remove useless use of basename
|
|
||||||
|
|
||||||
(cherry picked from commit 5e0f8c8a4ced36268d0077acafa1db2402776fa6)
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-run.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index 0f943631..5f4b38ca 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -10,7 +10,7 @@ for _i in /sys/class/net/*/
|
|
||||||
do
|
|
||||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
|
||||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
|
||||||
- ifname=$(basename $_i)
|
|
||||||
+ ifname=${_i##*/}
|
|
||||||
sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
|
||||||
source_hook initqueue/online $ifname
|
|
||||||
/sbin/netroot $ifname
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 94c75a2a827ff09ffac18454d5c4ba4756d721d6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 27 May 2019 12:44:17 +0200
|
|
||||||
Subject: [PATCH] network-manager: also read out next-server from NM state
|
|
||||||
|
|
||||||
(cherry picked from commit 4be95b67a73e7434f92a7d7c40955eae0b59717e)
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-run.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index 5f4b38ca..a539d5b2 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -11,7 +11,7 @@ do
|
|
||||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
|
||||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
|
||||||
ifname=${_i##*/}
|
|
||||||
- sed -n 's/root-path/new_root_path/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
|
||||||
+ sed -n 's/root-path/new_root_path/p;s/next-server/new_next_server/p' <$state >/tmp/dhclient.$ifname.dhcpopts
|
|
||||||
source_hook initqueue/online $ifname
|
|
||||||
/sbin/netroot $ifname
|
|
||||||
done
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 68fefe6f9424d3f29e6da9133579c385e7b470b2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 27 May 2019 12:43:59 +0200
|
|
||||||
Subject: [PATCH] network-manager: generate configuration with netroot=
|
|
||||||
|
|
||||||
If the root is on network, let nm-initrd-generator create configuration
|
|
||||||
even if none was explicitly specified on the command line.
|
|
||||||
|
|
||||||
Also do the same if /tmp/net.ifaces exists, because the anaconda plugin
|
|
||||||
creates an empty file in that location in hopes that will make us
|
|
||||||
configure the network.
|
|
||||||
|
|
||||||
(cherry picked from commit 381ab6b7cd2d35bf7f9da63b10c20f5ef6e61a8b)
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-config.sh | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
|
|
||||||
index 1339ebe7..1efa737c 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-config.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-config.sh
|
|
||||||
@@ -1,3 +1,7 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
+if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
|
|
||||||
+ echo rd.neednet >> /etc/cmdline.d/35-neednet.conf
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
/usr/libexec/nm-initrd-generator -- $(getcmdline)
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From 53cece208a44c53ecc001cb8eb769f6fb9b3d1dc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 27 May 2019 11:12:22 +0200
|
|
||||||
Subject: [PATCH] network: parse root=dhcp also with network-manager module
|
|
||||||
|
|
||||||
Move the logic from network-legacy to common network code.
|
|
||||||
|
|
||||||
(cherry picked from commit 35efada5ecffd139660b4a89f4cc3d627752c91e)
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/module-setup.sh | 1 -
|
|
||||||
modules.d/{35network-legacy => 40network}/dhcp-root.sh | 0
|
|
||||||
modules.d/40network/module-setup.sh | 1 +
|
|
||||||
3 files changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh
|
|
||||||
index 71abda36..5a82e998 100755
|
|
||||||
--- a/modules.d/35network-legacy/module-setup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/module-setup.sh
|
|
||||||
@@ -36,7 +36,6 @@ install() {
|
|
||||||
inst_simple -H "/etc/dhclient.conf"
|
|
||||||
cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
|
|
||||||
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
|
|
||||||
- inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
|
||||||
inst_hook cmdline 92 "$moddir/parse-ibft.sh"
|
|
||||||
inst_hook cmdline 95 "$moddir/parse-vlan.sh"
|
|
||||||
inst_hook cmdline 96 "$moddir/parse-bond.sh"
|
|
||||||
diff --git a/modules.d/35network-legacy/dhcp-root.sh b/modules.d/40network/dhcp-root.sh
|
|
||||||
similarity index 100%
|
|
||||||
rename from modules.d/35network-legacy/dhcp-root.sh
|
|
||||||
rename to modules.d/40network/dhcp-root.sh
|
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
|
||||||
index e8541636..8e2a74a3 100755
|
|
||||||
--- a/modules.d/40network/module-setup.sh
|
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
|
||||||
@@ -28,6 +28,7 @@ install() {
|
|
||||||
inst_script "$moddir/netroot.sh" "/sbin/netroot"
|
|
||||||
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
|
|
||||||
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
|
||||||
+ inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
|
||||||
|
|
||||||
dracut_need_initqueue
|
|
||||||
}
|
|
||||||
|
|
@ -1,620 +0,0 @@
|
|||||||
From 4e10601254bb20891dc2919416d7151583678c3d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 10 Jun 2019 16:04:18 +0200
|
|
||||||
Subject: [PATCH] test: copy BONDBRIDGETEAMVLAN to IFCFG
|
|
||||||
|
|
||||||
The IFCFG test will make sure the network-legacy plugin keeps writing
|
|
||||||
out correct ifcfg files.
|
|
||||||
|
|
||||||
This is a separate commit so that actual changes are visible in the
|
|
||||||
following one.
|
|
||||||
|
|
||||||
(cherry picked from commit 70787ab61957741a05e4046bad49758c4e9bc1cc)
|
|
||||||
---
|
|
||||||
test/TEST-60-IFCFG/99-idesymlinks.rules | 8 +
|
|
||||||
test/TEST-60-IFCFG/Makefile | 10 +
|
|
||||||
test/TEST-60-IFCFG/client-init.sh | 22 +++
|
|
||||||
test/TEST-60-IFCFG/dhcpd.conf | 27 +++
|
|
||||||
test/TEST-60-IFCFG/exports | 1 +
|
|
||||||
test/TEST-60-IFCFG/finished-false.sh | 2 +
|
|
||||||
test/TEST-60-IFCFG/hard-off.sh | 3 +
|
|
||||||
test/TEST-60-IFCFG/hosts | 5 +
|
|
||||||
test/TEST-60-IFCFG/server-init.sh | 120 ++++++++++++
|
|
||||||
test/TEST-60-IFCFG/test.sh | 336 ++++++++++++++++++++++++++++++++
|
|
||||||
10 files changed, 534 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-60-IFCFG/99-idesymlinks.rules b/test/TEST-60-IFCFG/99-idesymlinks.rules
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..d557790a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/99-idesymlinks.rules
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hda", SYMLINK+="sda"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hda*", SYMLINK+="sda$env{MINOR}"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdb", SYMLINK+="sdb"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdb*", SYMLINK+="sdb$env{MINOR}"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdc", SYMLINK+="sdc"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdc*", SYMLINK+="sdc$env{MINOR}"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="hdd", SYMLINK+="sdd"
|
|
||||||
+ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="partition", KERNEL=="hdd*", SYMLINK+="sdd$env{MINOR}"
|
|
||||||
diff --git a/test/TEST-60-IFCFG/Makefile b/test/TEST-60-IFCFG/Makefile
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..aad27059
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/Makefile
|
|
||||||
@@ -0,0 +1,10 @@
|
|
||||||
+all:
|
|
||||||
+ @$(MAKE) -s --no-print-directory -C ../.. all
|
|
||||||
+ @V=$(V) basedir=../.. testdir=../ ./test.sh --all
|
|
||||||
+setup:
|
|
||||||
+ @$(MAKE) --no-print-directory -C ../.. all
|
|
||||||
+ @basedir=../.. testdir=../ ./test.sh --setup
|
|
||||||
+clean:
|
|
||||||
+ @basedir=../.. testdir=../ ./test.sh --clean
|
|
||||||
+run:
|
|
||||||
+ @basedir=../.. testdir=../ ./test.sh --run
|
|
||||||
diff --git a/test/TEST-60-IFCFG/client-init.sh b/test/TEST-60-IFCFG/client-init.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..8c33ff0f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/client-init.sh
|
|
||||||
@@ -0,0 +1,22 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+exec >/dev/console 2>&1
|
|
||||||
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
+strstr() { [ "${1#*$2*}" != "$1" ]; }
|
|
||||||
+CMDLINE=$(while read line; do echo $line;done < /proc/cmdline)
|
|
||||||
+export TERM=linux
|
|
||||||
+export PS1='initramfs-test:\w\$ '
|
|
||||||
+stty sane
|
|
||||||
+echo "made it to the rootfs! Powering down."
|
|
||||||
+
|
|
||||||
+(
|
|
||||||
+ echo OK
|
|
||||||
+ ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
|
|
||||||
+ for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
|
|
||||||
+ echo $i
|
|
||||||
+ grep -v 'UUID=' $i
|
|
||||||
+ done
|
|
||||||
+ echo EOF
|
|
||||||
+) > /dev/sda
|
|
||||||
+
|
|
||||||
+strstr "$CMDLINE" "rd.shell" && sh -i
|
|
||||||
+poweroff -f
|
|
||||||
diff --git a/test/TEST-60-IFCFG/dhcpd.conf b/test/TEST-60-IFCFG/dhcpd.conf
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..e26bd60b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/dhcpd.conf
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+ddns-update-style none;
|
|
||||||
+
|
|
||||||
+use-host-decl-names true;
|
|
||||||
+
|
|
||||||
+subnet 192.168.50.0 netmask 255.255.255.0 {
|
|
||||||
+ option subnet-mask 255.255.255.0;
|
|
||||||
+ option routers 192.168.50.1;
|
|
||||||
+ next-server 192.168.50.1;
|
|
||||||
+ server-identifier 192.168.50.1;
|
|
||||||
+ option domain-name-servers 192.168.50.1;
|
|
||||||
+ option domain-search "example.com";
|
|
||||||
+ option domain-name "other.com";
|
|
||||||
+ option root-path "nfs:192.168.50.1:/nfs/client";
|
|
||||||
+ range 192.168.50.10 192.168.50.100;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+subnet 192.168.51.0 netmask 255.255.255.0 {
|
|
||||||
+ option subnet-mask 255.255.255.0;
|
|
||||||
+ option routers 192.168.51.1;
|
|
||||||
+ next-server 192.168.51.1;
|
|
||||||
+ server-identifier 192.168.51.1;
|
|
||||||
+ option domain-name-servers 192.168.51.1;
|
|
||||||
+ option domain-search "example.com";
|
|
||||||
+ option domain-name "other.com";
|
|
||||||
+ option root-path "nfs:192.168.51.1:/nfs/client";
|
|
||||||
+ range 192.168.51.10 192.168.51.100;
|
|
||||||
+}
|
|
||||||
diff --git a/test/TEST-60-IFCFG/exports b/test/TEST-60-IFCFG/exports
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..ff5f29b1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/exports
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+/nfs/client 192.168.50.0/24(rw,insecure,no_subtree_check,no_root_squash)
|
|
||||||
diff --git a/test/TEST-60-IFCFG/finished-false.sh b/test/TEST-60-IFCFG/finished-false.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..ecdbef95
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/finished-false.sh
|
|
||||||
@@ -0,0 +1,2 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+exit 1
|
|
||||||
diff --git a/test/TEST-60-IFCFG/hard-off.sh b/test/TEST-60-IFCFG/hard-off.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..12c3d5ac
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/hard-off.sh
|
|
||||||
@@ -0,0 +1,3 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+getarg rd.shell || poweroff -f
|
|
||||||
+getarg failme && poweroff -f
|
|
||||||
diff --git a/test/TEST-60-IFCFG/hosts b/test/TEST-60-IFCFG/hosts
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..d02a4e9b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/hosts
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+127.0.0.1 localhost
|
|
||||||
+192.168.50.1 server
|
|
||||||
+192.168.50.100 client-if1
|
|
||||||
+192.168.50.101 client-if2
|
|
||||||
+192.168.50.102 client-if3
|
|
||||||
diff --git a/test/TEST-60-IFCFG/server-init.sh b/test/TEST-60-IFCFG/server-init.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..b9f01c9b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/server-init.sh
|
|
||||||
@@ -0,0 +1,120 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+exec </dev/console >/dev/console 2>&1
|
|
||||||
+set -x
|
|
||||||
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
||||||
+export TERM=linux
|
|
||||||
+export PS1='nfstest-server:\w\$ '
|
|
||||||
+stty sane
|
|
||||||
+echo "made it to the rootfs!"
|
|
||||||
+echo server > /proc/sys/kernel/hostname
|
|
||||||
+
|
|
||||||
+wait_for_if_link() {
|
|
||||||
+ local cnt=0
|
|
||||||
+ local li
|
|
||||||
+ while [ $cnt -lt 600 ]; do
|
|
||||||
+ li=$(ip -o link show dev $1 2>/dev/null)
|
|
||||||
+ [ -n "$li" ] && return 0
|
|
||||||
+ sleep 0.1
|
|
||||||
+ cnt=$(($cnt+1))
|
|
||||||
+ done
|
|
||||||
+ return 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+wait_for_if_up() {
|
|
||||||
+ local cnt=0
|
|
||||||
+ local li
|
|
||||||
+ while [ $cnt -lt 200 ]; do
|
|
||||||
+ li=$(ip -o link show up dev $1)
|
|
||||||
+ [ -n "$li" ] && return 0
|
|
||||||
+ sleep 0.1
|
|
||||||
+ cnt=$(($cnt+1))
|
|
||||||
+ done
|
|
||||||
+ return 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+wait_for_route_ok() {
|
|
||||||
+ local cnt=0
|
|
||||||
+ while [ $cnt -lt 200 ]; do
|
|
||||||
+ li=$(ip route show)
|
|
||||||
+ [ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
|
||||||
+ sleep 0.1
|
|
||||||
+ cnt=$(($cnt+1))
|
|
||||||
+ done
|
|
||||||
+ return 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+linkup() {
|
|
||||||
+ wait_for_if_link $1 2>/dev/null\
|
|
||||||
+ && ip link set $1 up 2>/dev/null\
|
|
||||||
+ && wait_for_if_up $1 2>/dev/null
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+modprobe --all -b -q 8021q ipvlan macvlan
|
|
||||||
+>/dev/watchdog
|
|
||||||
+ip addr add 127.0.0.1/8 dev lo
|
|
||||||
+linkup lo
|
|
||||||
+ip link set dev eth0 name ens3
|
|
||||||
+ip addr add 192.168.50.1/24 dev ens3
|
|
||||||
+linkup ens3
|
|
||||||
+>/dev/watchdog
|
|
||||||
+ip link set dev eth1 name ens4
|
|
||||||
+ip link add dev ens4.1 link ens4 type vlan id 1
|
|
||||||
+ip link add dev ens4.2 link ens4 type vlan id 2
|
|
||||||
+ip link add dev ens4.3 link ens4 type vlan id 3
|
|
||||||
+ip link add dev ens4.4 link ens4 type vlan id 4
|
|
||||||
+ip addr add 192.168.54.1/24 dev ens4.1
|
|
||||||
+ip addr add 192.168.55.1/24 dev ens4.2
|
|
||||||
+ip addr add 192.168.56.1/24 dev ens4.3
|
|
||||||
+ip addr add 192.168.57.1/24 dev ens4.4
|
|
||||||
+linkup ens4
|
|
||||||
+ip link set dev ens4.1 up
|
|
||||||
+ip link set dev ens4.2 up
|
|
||||||
+ip link set dev ens4.3 up
|
|
||||||
+ip link set dev ens4.4 up
|
|
||||||
+ip link set dev eth2 name ens5
|
|
||||||
+ip addr add 192.168.51.1/24 dev ens5
|
|
||||||
+linkup ens5
|
|
||||||
+ip link set dev eth3 name ens6
|
|
||||||
+linkup ens6
|
|
||||||
+>/dev/watchdog
|
|
||||||
+modprobe af_packet
|
|
||||||
+> /dev/watchdog
|
|
||||||
+modprobe sunrpc
|
|
||||||
+>/dev/watchdog
|
|
||||||
+mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs
|
|
||||||
+>/dev/watchdog
|
|
||||||
+[ -x /sbin/portmap ] && portmap
|
|
||||||
+>/dev/watchdog
|
|
||||||
+mkdir -p /run/rpcbind
|
|
||||||
+[ -x /sbin/rpcbind ] && rpcbind
|
|
||||||
+>/dev/watchdog
|
|
||||||
+modprobe nfsd
|
|
||||||
+>/dev/watchdog
|
|
||||||
+mount -t nfsd nfsd /proc/fs/nfsd
|
|
||||||
+>/dev/watchdog
|
|
||||||
+exportfs -r
|
|
||||||
+>/dev/watchdog
|
|
||||||
+rpc.nfsd
|
|
||||||
+>/dev/watchdog
|
|
||||||
+rpc.mountd
|
|
||||||
+>/dev/watchdog
|
|
||||||
+rpc.idmapd
|
|
||||||
+>/dev/watchdog
|
|
||||||
+exportfs -r
|
|
||||||
+>/dev/watchdog
|
|
||||||
+>/var/lib/dhcpd/dhcpd.leases
|
|
||||||
+>/dev/watchdog
|
|
||||||
+chmod 777 /var/lib/dhcpd/dhcpd.leases
|
|
||||||
+>/dev/watchdog
|
|
||||||
+dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases ens3 ens5
|
|
||||||
+#echo -n 'V' > /dev/watchdog
|
|
||||||
+#sh -i
|
|
||||||
+#tcpdump -i ens3
|
|
||||||
+# Wait forever for the VM to die
|
|
||||||
+echo "Serving NFS mounts"
|
|
||||||
+while :; do
|
|
||||||
+ sleep 10
|
|
||||||
+ >/dev/watchdog
|
|
||||||
+done
|
|
||||||
+mount -n -o remount,ro /
|
|
||||||
+poweroff -f
|
|
||||||
diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..8c11a7d3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/TEST-60-IFCFG/test.sh
|
|
||||||
@@ -0,0 +1,336 @@
|
|
||||||
+#!/bin/bash
|
|
||||||
+# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
+# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
+TEST_DESCRIPTION="root filesystem on NFS with bridging/bonding/vlan"
|
|
||||||
+KVERSION=${KVERSION-$(uname -r)}
|
|
||||||
+
|
|
||||||
+# Uncomment this to debug failures
|
|
||||||
+#DEBUGFAIL="rd.shell rd.break"
|
|
||||||
+#DEBUGFAIL="rd.shell rd.break rd.debug"
|
|
||||||
+#SERIAL="tcp:127.0.0.1:9999"
|
|
||||||
+
|
|
||||||
+run_server() {
|
|
||||||
+ # Start server first
|
|
||||||
+ echo "MULTINIC TEST SETUP: Starting DHCP/NFS server"
|
|
||||||
+
|
|
||||||
+ fsck -a "$TESTDIR"/server.ext3 || return 1
|
|
||||||
+
|
|
||||||
+ $testdir/run-qemu \
|
|
||||||
+ -hda "$TESTDIR"/server.ext3 \
|
|
||||||
+ -m 512M -smp 2 \
|
|
||||||
+ -display none \
|
|
||||||
+ -netdev socket,id=n0,listen=127.0.0.1:12370 \
|
|
||||||
+ -netdev socket,id=n1,listen=127.0.0.1:12371 \
|
|
||||||
+ -netdev socket,id=n2,listen=127.0.0.1:12372 \
|
|
||||||
+ -netdev socket,id=n3,listen=127.0.0.1:12373 \
|
|
||||||
+ -device e1000,netdev=n0,mac=52:54:01:12:34:56 \
|
|
||||||
+ -device e1000,netdev=n1,mac=52:54:01:12:34:57 \
|
|
||||||
+ -device e1000,netdev=n2,mac=52:54:01:12:34:58 \
|
|
||||||
+ -device e1000,netdev=n3,mac=52:54:01:12:34:59 \
|
|
||||||
+ ${SERIAL:+-serial "$SERIAL"} \
|
|
||||||
+ ${SERIAL:--serial file:"$TESTDIR"/server.log} \
|
|
||||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
+ -no-reboot \
|
|
||||||
+ -append "panic=1 loglevel=7 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0 rd.debug" \
|
|
||||||
+ -initrd "$TESTDIR"/initramfs.server \
|
|
||||||
+ -pidfile "$TESTDIR"/server.pid -daemonize || return 1
|
|
||||||
+ chmod 644 -- "$TESTDIR"/server.pid || return 1
|
|
||||||
+
|
|
||||||
+ # Cleanup the terminal if we have one
|
|
||||||
+ tty -s && stty sane
|
|
||||||
+
|
|
||||||
+ echo Sleeping 10 seconds to give the server a head start
|
|
||||||
+ sleep 10
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+client_test() {
|
|
||||||
+ local test_name="$1"
|
|
||||||
+ local do_vlan13="$2"
|
|
||||||
+ local cmdline="$3"
|
|
||||||
+ local check="$4"
|
|
||||||
+ local CONF
|
|
||||||
+
|
|
||||||
+ echo "CLIENT TEST START: $test_name"
|
|
||||||
+
|
|
||||||
+ [ "$do_vlan13" != "yes" ] && unset do_vlan13
|
|
||||||
+
|
|
||||||
+ # Need this so kvm-qemu will boot (needs non-/dev/zero local disk)
|
|
||||||
+ if ! dd if=/dev/zero of="$TESTDIR"/client.img bs=1M count=1; then
|
|
||||||
+ echo "Unable to make client sda image" 1>&2
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+ if [[ $do_vlan13 ]]; then
|
|
||||||
+ nic1=" -netdev socket,connect=127.0.0.1:12371,id=n1"
|
|
||||||
+ nic3=" -netdev socket,connect=127.0.0.1:12373,id=n3"
|
|
||||||
+ else
|
|
||||||
+ nic1=" -netdev hubport,id=n1,hubid=2"
|
|
||||||
+ nic3=" -netdev hubport,id=n3,hubid=3"
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if $testdir/run-qemu --help | grep -qF -m1 'netdev hubport,id=str,hubid=n[,netdev=nd]' && echo OK; then
|
|
||||||
+ $testdir/run-qemu \
|
|
||||||
+ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
|
|
||||||
+ -netdev socket,connect=127.0.0.1:12370,id=s1 \
|
|
||||||
+ -netdev hubport,hubid=1,id=h1,netdev=s1 \
|
|
||||||
+ -netdev hubport,hubid=1,id=h2 -device e1000,mac=52:54:00:12:34:01,netdev=h2 \
|
|
||||||
+ -netdev hubport,hubid=1,id=h3 -device e1000,mac=52:54:00:12:34:02,netdev=h3 \
|
|
||||||
+ $nic1 -device e1000,mac=52:54:00:12:34:03,netdev=n1 \
|
|
||||||
+ -netdev socket,connect=127.0.0.1:12372,id=n2 -device e1000,mac=52:54:00:12:34:04,netdev=n2 \
|
|
||||||
+ $nic3 -device e1000,mac=52:54:00:12:34:05,netdev=n3 \
|
|
||||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
+ -no-reboot \
|
|
||||||
+ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
+ -initrd "$TESTDIR"/initramfs.testing
|
|
||||||
+ else
|
|
||||||
+ $testdir/run-qemu \
|
|
||||||
+ -hda "$TESTDIR"/client.img -m 512M -smp 2 -nographic \
|
|
||||||
+ -net socket,vlan=0,connect=127.0.0.1:12370 \
|
|
||||||
+ ${do_vlan13:+-net socket,vlan=1,connect=127.0.0.1:12371} \
|
|
||||||
+ -net socket,vlan=2,connect=127.0.0.1:12372 \
|
|
||||||
+ ${do_vlan13:+-net socket,vlan=3,connect=127.0.0.1:12373} \
|
|
||||||
+ -net nic,vlan=0,macaddr=52:54:00:12:34:01,model=e1000 \
|
|
||||||
+ -net nic,vlan=0,macaddr=52:54:00:12:34:02,model=e1000 \
|
|
||||||
+ -net nic,vlan=1,macaddr=52:54:00:12:34:03,model=e1000 \
|
|
||||||
+ -net nic,vlan=2,macaddr=52:54:00:12:34:04,model=e1000 \
|
|
||||||
+ -net nic,vlan=3,macaddr=52:54:00:12:34:05,model=e1000 \
|
|
||||||
+ -watchdog i6300esb -watchdog-action poweroff \
|
|
||||||
+ -no-reboot \
|
|
||||||
+ -append "panic=1 $cmdline rd.debug $DEBUGFAIL rd.retry=5 rw console=ttyS0,115200n81 selinux=0 init=/sbin/init" \
|
|
||||||
+ -initrd "$TESTDIR"/initramfs.testing
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ {
|
|
||||||
+ read OK
|
|
||||||
+ if [[ "$OK" != "OK" ]]; then
|
|
||||||
+ echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ while read line; do
|
|
||||||
+ [[ $line == END ]] && break
|
|
||||||
+ CONF+="$line "
|
|
||||||
+ done
|
|
||||||
+ } < "$TESTDIR"/client.img || return 1
|
|
||||||
+
|
|
||||||
+ if [[ "$check" != "$CONF" ]]; then
|
|
||||||
+ echo "Expected: '$check'"
|
|
||||||
+ echo
|
|
||||||
+ echo
|
|
||||||
+ echo "Got: '$CONF'"
|
|
||||||
+ echo "CLIENT TEST END: $test_name [FAILED - BAD CONF]"
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ echo "CLIENT TEST END: $test_name [OK]"
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+test_run() {
|
|
||||||
+ if ! run_server; then
|
|
||||||
+ echo "Failed to start server" 1>&2
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+ test_client || { kill_server; return 1; }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+test_client() {
|
|
||||||
+ client_test "Multiple VLAN" \
|
|
||||||
+ "yes" \
|
|
||||||
+ "
|
|
||||||
+vlan=vlan0001:ens5
|
|
||||||
+vlan=vlan2:ens5
|
|
||||||
+vlan=ens5.3:ens5
|
|
||||||
+vlan=ens5.0004:ens5
|
|
||||||
+ip=ens3:dhcp
|
|
||||||
+ip=192.168.54.101::192.168.54.1:24:test:vlan0001:none
|
|
||||||
+ip=192.168.55.102::192.168.55.1:24:test:vlan2:none
|
|
||||||
+ip=192.168.56.103::192.168.56.1:24:test:ens5.3:none
|
|
||||||
+ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none
|
|
||||||
+rd.neednet=1
|
|
||||||
+root=nfs:192.168.50.1:/nfs/client bootdev=ens3
|
|
||||||
+" \
|
|
||||||
+ 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \
|
|
||||||
+ || return 1
|
|
||||||
+
|
|
||||||
+ client_test "Multiple Bonds" \
|
|
||||||
+ "yes" \
|
|
||||||
+ "
|
|
||||||
+bond=bond0:ens4,ens5
|
|
||||||
+bond=bond1:ens6,ens7
|
|
||||||
+ip=bond0:dhcp
|
|
||||||
+ip=bond1:dhcp
|
|
||||||
+rd.neednet=1
|
|
||||||
+root=nfs:192.168.50.1:/nfs/client bootdev=bond0
|
|
||||||
+" \
|
|
||||||
+ 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \
|
|
||||||
+ || return 1
|
|
||||||
+
|
|
||||||
+ client_test "Multiple Bridges" \
|
|
||||||
+ "no" \
|
|
||||||
+ "
|
|
||||||
+bridge=br0:ens4,ens5
|
|
||||||
+bridge=br1:ens6,ens7
|
|
||||||
+ip=br0:dhcp
|
|
||||||
+ip=br1:dhcp
|
|
||||||
+rd.neednet=1
|
|
||||||
+root=nfs:192.168.50.1:/nfs/client bootdev=br0
|
|
||||||
+" \
|
|
||||||
+ 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \
|
|
||||||
+ || return 1
|
|
||||||
+
|
|
||||||
+ kill_server
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+test_setup() {
|
|
||||||
+ # Make server root
|
|
||||||
+ dd if=/dev/null of="$TESTDIR"/server.ext3 bs=1M seek=120
|
|
||||||
+ mke2fs -j -F -- "$TESTDIR"/server.ext3
|
|
||||||
+ mkdir -- "$TESTDIR"/mnt
|
|
||||||
+ mount -o loop -- "$TESTDIR"/server.ext3 "$TESTDIR"/mnt
|
|
||||||
+ kernel=$KVERSION
|
|
||||||
+ (
|
|
||||||
+ export initdir="$TESTDIR"/mnt
|
|
||||||
+ . "$basedir"/dracut-init.sh
|
|
||||||
+
|
|
||||||
+ (
|
|
||||||
+ cd "$initdir";
|
|
||||||
+ mkdir -p -- dev sys proc run etc var/run tmp var/lib/{dhcpd,rpcbind}
|
|
||||||
+ mkdir -p -- var/lib/nfs/{v4recovery,rpc_pipefs}
|
|
||||||
+ chmod 777 -- var/lib/rpcbind var/lib/nfs
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ for _f in modules.builtin.bin modules.builtin; do
|
|
||||||
+ [[ $srcmods/$_f ]] && break
|
|
||||||
+ done || {
|
|
||||||
+ dfatal "No modules.builtin.bin and modules.builtin found!"
|
|
||||||
+ return 1
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for _f in modules.builtin.bin modules.builtin modules.order; do
|
|
||||||
+ [[ $srcmods/$_f ]] && inst_simple "$srcmods/$_f" "/lib/modules/$kernel/$_f"
|
|
||||||
+ done
|
|
||||||
+
|
|
||||||
+ inst_multiple sh ls shutdown poweroff stty cat ps ln ip \
|
|
||||||
+ dmesg mkdir cp ping exportfs \
|
|
||||||
+ modprobe rpc.nfsd rpc.mountd showmount tcpdump \
|
|
||||||
+ /etc/services sleep mount chmod
|
|
||||||
+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
||||||
+ [ -f "${_terminfodir}"/l/linux ] && break
|
|
||||||
+ done
|
|
||||||
+ inst_multiple -o "${_terminfodir}"/l/linux
|
|
||||||
+ type -P portmap >/dev/null && inst_multiple portmap
|
|
||||||
+ type -P rpcbind >/dev/null && inst_multiple rpcbind
|
|
||||||
+ [ -f /etc/netconfig ] && inst_multiple /etc/netconfig
|
|
||||||
+ type -P dhcpd >/dev/null && inst_multiple dhcpd
|
|
||||||
+ [ -x /usr/sbin/dhcpd3 ] && inst /usr/sbin/dhcpd3 /usr/sbin/dhcpd
|
|
||||||
+ instmods nfsd sunrpc ipv6 lockd af_packet 8021q ipvlan macvlan
|
|
||||||
+ inst_simple /etc/os-release
|
|
||||||
+ inst ./server-init.sh /sbin/init
|
|
||||||
+ inst ./hosts /etc/hosts
|
|
||||||
+ inst ./exports /etc/exports
|
|
||||||
+ inst ./dhcpd.conf /etc/dhcpd.conf
|
|
||||||
+ inst_multiple /etc/nsswitch.conf /etc/rpc /etc/protocols
|
|
||||||
+
|
|
||||||
+ inst_multiple rpc.idmapd /etc/idmapd.conf
|
|
||||||
+
|
|
||||||
+ inst_libdir_file 'libnfsidmap_nsswitch.so*'
|
|
||||||
+ inst_libdir_file 'libnfsidmap/*.so*'
|
|
||||||
+ inst_libdir_file 'libnfsidmap*.so*'
|
|
||||||
+
|
|
||||||
+ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
|
|
||||||
+ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
|
|
||||||
+ _nsslibs=${_nsslibs#|}
|
|
||||||
+ _nsslibs=${_nsslibs%|}
|
|
||||||
+
|
|
||||||
+ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
|
|
||||||
+
|
|
||||||
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
|
|
||||||
+ inst /etc/passwd /etc/passwd
|
|
||||||
+ inst /etc/group /etc/group
|
|
||||||
+
|
|
||||||
+ cp -a -- /etc/ld.so.conf* "$initdir"/etc
|
|
||||||
+ ldconfig -r "$initdir"
|
|
||||||
+ dracut_kernel_post
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ # Make client root inside server root
|
|
||||||
+ (
|
|
||||||
+ export initdir="$TESTDIR"/mnt/nfs/client
|
|
||||||
+ . "$basedir"/dracut-init.sh
|
|
||||||
+ inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
|
||||||
+ mount dmesg mkdir cp ping grep ls sort
|
|
||||||
+ for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
||||||
+ [[ -f ${_terminfodir}/l/linux ]] && break
|
|
||||||
+ done
|
|
||||||
+ inst_multiple -o "${_terminfodir}"/l/linux
|
|
||||||
+ inst_simple /etc/os-release
|
|
||||||
+ inst ./client-init.sh /sbin/init
|
|
||||||
+ (
|
|
||||||
+ cd "$initdir"
|
|
||||||
+ mkdir -p -- dev sys proc etc run
|
|
||||||
+ mkdir -p -- var/lib/nfs/rpc_pipefs
|
|
||||||
+ )
|
|
||||||
+ inst /etc/nsswitch.conf /etc/nsswitch.conf
|
|
||||||
+ inst /etc/passwd /etc/passwd
|
|
||||||
+ inst /etc/group /etc/group
|
|
||||||
+
|
|
||||||
+ inst_multiple rpc.idmapd /etc/idmapd.conf
|
|
||||||
+ inst_libdir_file 'libnfsidmap_nsswitch.so*'
|
|
||||||
+ inst_libdir_file 'libnfsidmap/*.so*'
|
|
||||||
+ inst_libdir_file 'libnfsidmap*.so*'
|
|
||||||
+
|
|
||||||
+ _nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' -- /etc/nsswitch.conf \
|
|
||||||
+ | tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
|
|
||||||
+ _nsslibs=${_nsslibs#|}
|
|
||||||
+ _nsslibs=${_nsslibs%|}
|
|
||||||
+
|
|
||||||
+ inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
|
|
||||||
+
|
|
||||||
+ cp -a -- /etc/ld.so.conf* "$initdir"/etc
|
|
||||||
+ ldconfig -r "$initdir"
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ umount "$TESTDIR"/mnt
|
|
||||||
+ rm -fr -- "$TESTDIR"/mnt
|
|
||||||
+
|
|
||||||
+ # Make an overlay with needed tools for the test harness
|
|
||||||
+ (
|
|
||||||
+ export initdir="$TESTDIR"/overlay
|
|
||||||
+ . "$basedir"/dracut-init.sh
|
|
||||||
+ inst_multiple poweroff shutdown
|
|
||||||
+ inst_hook emergency 000 ./hard-off.sh
|
|
||||||
+ inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ # Make server's dracut image
|
|
||||||
+ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
|
||||||
+ --no-early-microcode \
|
|
||||||
+ -m "udev-rules base rootfs-block fs-lib debug kernel-modules watchdog" \
|
|
||||||
+ -d "ipvlan macvlan af_packet piix ide-gd_mod ata_piix ext3 sd_mod nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files nfsd e1000 i6300esb ib700wdt" \
|
|
||||||
+ --no-hostonly-cmdline -N \
|
|
||||||
+ -f "$TESTDIR"/initramfs.server "$KVERSION" || return 1
|
|
||||||
+
|
|
||||||
+ # Make client's dracut image
|
|
||||||
+ $basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
|
||||||
+ --no-early-microcode \
|
|
||||||
+ -o "plymouth" \
|
|
||||||
+ -a "debug" \
|
|
||||||
+ -d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \
|
|
||||||
+ --no-hostonly-cmdline -N \
|
|
||||||
+ -f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+kill_server() {
|
|
||||||
+ if [[ -s "$TESTDIR"/server.pid ]]; then
|
|
||||||
+ kill -TERM -- $(cat "$TESTDIR"/server.pid)
|
|
||||||
+ rm -f -- "$TESTDIR"/server.pid
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+test_cleanup() {
|
|
||||||
+ kill_server
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+. "$testdir"/test-functions
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From 3b89c398895abe5fc62e3c9240718310222925ef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 10 Jun 2019 16:04:33 +0200
|
|
||||||
Subject: [PATCH] test/IFCFG: make sure the network-legacy plugin is being used
|
|
||||||
|
|
||||||
If the network-manager plugin is used instead, it wouldn't write out
|
|
||||||
ifcfg files and we wouldn't have anything to check.
|
|
||||||
|
|
||||||
While at that, also enable the test.
|
|
||||||
|
|
||||||
(cherry picked from commit 2b1b3bcdcb0ddaa18337f18da515adb6284df0ab)
|
|
||||||
---
|
|
||||||
.travis.yml | 1 +
|
|
||||||
README.md | 1 +
|
|
||||||
test/TEST-60-IFCFG/test.sh | 2 +-
|
|
||||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/.travis.yml b/.travis.yml
|
|
||||||
index 364078cf..37002e9a 100644
|
|
||||||
--- a/.travis.yml
|
|
||||||
+++ b/.travis.yml
|
|
||||||
@@ -11,6 +11,7 @@ env:
|
|
||||||
- IMAGE=latest TESTS=50
|
|
||||||
- IMAGE=latest TESTS=30
|
|
||||||
- IMAGE=latest TESTS=31
|
|
||||||
+ - IMAGE=latest TESTS=60
|
|
||||||
- IMAGE=latest TESTS=70
|
|
||||||
- IMAGE=latest TESTS=99
|
|
||||||
- IMAGE=latest TESTS=02
|
|
||||||
diff --git a/README.md b/README.md
|
|
||||||
index 36ae7e1b..530f1c1b 100644
|
|
||||||
--- a/README.md
|
|
||||||
+++ b/README.md
|
|
||||||
@@ -27,4 +27,5 @@ dracut is an initramfs infrastructure.
|
|
||||||
- Test 31: [![Test 31](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/)
|
|
||||||
- Test 40: [![Test 40](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/)
|
|
||||||
- Test 50: [![Test 50](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/)
|
|
||||||
+- Test 60: [![Test 60](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/)
|
|
||||||
- Test 70: [![Test 70](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/badge/icon)](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/)
|
|
||||||
diff --git a/test/TEST-60-IFCFG/test.sh b/test/TEST-60-IFCFG/test.sh
|
|
||||||
index 8c11a7d3..8e8bd982 100755
|
|
||||||
--- a/test/TEST-60-IFCFG/test.sh
|
|
||||||
+++ b/test/TEST-60-IFCFG/test.sh
|
|
||||||
@@ -316,7 +316,7 @@ test_setup() {
|
|
||||||
$basedir/dracut.sh -l -i "$TESTDIR"/overlay / \
|
|
||||||
--no-early-microcode \
|
|
||||||
-o "plymouth" \
|
|
||||||
- -a "debug" \
|
|
||||||
+ -a "debug network-legacy" \
|
|
||||||
-d "ipvlan macvlan af_packet piix sd_mod sr_mod ata_piix ide-gd_mod e1000 nfsv2 nfsv3 nfsv4 nfs_acl nfs_layout_nfsv41_files sunrpc i6300esb ib700wdt" \
|
|
||||||
--no-hostonly-cmdline -N \
|
|
||||||
-f "$TESTDIR"/initramfs.testing "$KVERSION" || return 1
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
|||||||
From 15ff303dde65e97ba224a9f2cc6275cbaafee52c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 10 Jun 2019 16:05:23 +0200
|
|
||||||
Subject: [PATCH] test/BONDBRIDGETEAMVLAN: don't assert against ifcfg files
|
|
||||||
|
|
||||||
The network-manager module writes keyfiles instead of ifcfg files. Just
|
|
||||||
check whether the configuration got actually applied correctly.
|
|
||||||
|
|
||||||
(cherry picked from commit 9dfd73bcbd899d8da4bc680fa8b3326c47b939bd)
|
|
||||||
---
|
|
||||||
test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh | 6 +-----
|
|
||||||
test/TEST-70-BONDBRIDGETEAMVLAN/test.sh | 12 ++++++------
|
|
||||||
2 files changed, 7 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
|
||||||
index 8c33ff0f..083e0f59 100755
|
|
||||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
|
||||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/client-init.sh
|
|
||||||
@@ -10,11 +10,7 @@ echo "made it to the rootfs! Powering down."
|
|
||||||
|
|
||||||
(
|
|
||||||
echo OK
|
|
||||||
- ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
|
|
||||||
- for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
|
|
||||||
- echo $i
|
|
||||||
- grep -v 'UUID=' $i
|
|
||||||
- done
|
|
||||||
+ ip -o -4 address show scope global |sed -n 's/^[^:]*: \([^ ]*\) *\(.*\) scope.*/\1 \2/p' |sort
|
|
||||||
echo EOF
|
|
||||||
) > /dev/sda
|
|
||||||
|
|
||||||
diff --git a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
index 5618baee..b6dd080c 100755
|
|
||||||
--- a/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
+++ b/test/TEST-70-BONDBRIDGETEAMVLAN/test.sh
|
|
||||||
@@ -112,8 +112,8 @@ client_test() {
|
|
||||||
done
|
|
||||||
} < "$TESTDIR"/client.img || return 1
|
|
||||||
|
|
||||||
- if [[ "$check" != "$CONF" ]]; then
|
|
||||||
- echo "Expected: '$check'"
|
|
||||||
+ if [[ ! "$CONF" =~ ^$check$ ]]; then
|
|
||||||
+ echo "Expected: /^$check\$/"
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Got: '$CONF'"
|
|
||||||
@@ -150,7 +150,7 @@ ip=192.168.57.104::192.168.57.1:24:test:ens5.0004:none
|
|
||||||
rd.neednet=1
|
|
||||||
root=nfs:192.168.50.1:/nfs/client bootdev=ens3
|
|
||||||
" \
|
|
||||||
- 'ens3 ens5.0004 ens5.3 vlan0001 vlan2 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens3 # Generated by dracut initrd NAME="ens3" DEVICE="ens3" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Ethernet /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.0004 # Generated by dracut initrd NAME="ens5.0004" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.57.104" PREFIX="24" GATEWAY="192.168.57.1" TYPE=Vlan DEVICE="ens5.0004" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5.3 # Generated by dracut initrd NAME="ens5.3" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.56.103" PREFIX="24" GATEWAY="192.168.56.1" TYPE=Vlan DEVICE="ens5.3" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan0001 # Generated by dracut initrd NAME="vlan0001" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.54.101" PREFIX="24" GATEWAY="192.168.54.1" TYPE=Vlan DEVICE="vlan0001" VLAN=yes PHYSDEV="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-vlan2 # Generated by dracut initrd NAME="vlan2" ONBOOT=yes NETBOOT=yes BOOTPROTO=none IPADDR="192.168.55.102" PREFIX="24" GATEWAY="192.168.55.1" TYPE=Vlan DEVICE="vlan2" VLAN=yes PHYSDEV="ens5" EOF ' \
|
|
||||||
+ 'ens3 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 ens5\.0004 inet 192\.168\.57\.104/24 brd 192\.168\.57\.255 ens5\.3 inet 192\.168\.56\.103/24 brd 192\.168\.56\.255 vlan0001 inet 192\.168\.54\.101/24 brd 192\.168\.54\.255 vlan2 inet 192\.168\.55\.102/24 brd 192\.168\.55\.255 EOF ' \
|
|
||||||
|| return 1
|
|
||||||
|
|
||||||
client_test "Multiple Bonds" \
|
|
||||||
@@ -163,7 +163,7 @@ ip=bond1:dhcp
|
|
||||||
rd.neednet=1
|
|
||||||
root=nfs:192.168.50.1:/nfs/client bootdev=bond0
|
|
||||||
" \
|
|
||||||
- 'bond0 bond1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond0 # Generated by dracut initrd NAME="bond0" DEVICE="bond0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond0" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-bond1 # Generated by dracut initrd NAME="bond1" DEVICE="bond1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp BONDING_OPTS="" NAME="bond1" TYPE=Bond /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes SLAVE=yes MASTER="bond1" DEVICE="ens7" EOF ' \
|
|
||||||
+ 'bond0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 bond1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \
|
|
||||||
|| return 1
|
|
||||||
|
|
||||||
client_test "Multiple Bridges" \
|
|
||||||
@@ -176,7 +176,7 @@ ip=br1:dhcp
|
|
||||||
rd.neednet=1
|
|
||||||
root=nfs:192.168.50.1:/nfs/client bootdev=br0
|
|
||||||
" \
|
|
||||||
- 'br0 br1 /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br0 # Generated by dracut initrd NAME="br0" DEVICE="br0" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br0" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-br1 # Generated by dracut initrd NAME="br1" DEVICE="br1" ONBOOT=yes NETBOOT=yes IPV6INIT=yes BOOTPROTO=dhcp TYPE=Bridge NAME="br1" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens4 # Generated by dracut initrd NAME="ens4" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens4" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens5 # Generated by dracut initrd NAME="ens5" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br0" DEVICE="ens5" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens6 # Generated by dracut initrd NAME="ens6" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens6" /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-ens7 # Generated by dracut initrd NAME="ens7" TYPE=Ethernet ONBOOT=yes NETBOOT=yes BRIDGE="br1" DEVICE="ens7" EOF ' \
|
|
||||||
+ 'br0 inet 192\.168\.50\.[0-9]*/24 brd 192\.168\.50\.255 br1 inet 192\.168\.51\.[0-9]*/24 brd 192\.168\.51\.255 EOF ' \
|
|
||||||
|| return 1
|
|
||||||
|
|
||||||
kill_server
|
|
||||||
@@ -260,7 +260,7 @@ test_setup() {
|
|
||||||
export initdir="$TESTDIR"/mnt/nfs/client
|
|
||||||
. "$basedir"/dracut-init.sh
|
|
||||||
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
|
||||||
- mount dmesg mkdir cp ping grep ls sort
|
|
||||||
+ mount dmesg mkdir cp ping grep ls sort sed
|
|
||||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
|
||||||
[[ -f ${_terminfodir}/l/linux ]] && break
|
|
||||||
done
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 96976e84e2c8544ab32026f05da8a35b9c48b2e5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 10 Jun 2019 16:05:49 +0200
|
|
||||||
Subject: [PATCH] test/MULTINIC: correctly note activated devices when using
|
|
||||||
network-manager
|
|
||||||
|
|
||||||
The .did-setup files are not there. What is there is the NetworkManager
|
|
||||||
connection files.
|
|
||||||
|
|
||||||
(cherry picked from commit 393fb1ac05ec3386a07d885e99985a647634803e)
|
|
||||||
---
|
|
||||||
test/TEST-50-MULTINIC/client-init.sh | 10 ++++++++++
|
|
||||||
1 file changed, 10 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh
|
|
||||||
index 529379f0..7099dcf3 100755
|
|
||||||
--- a/test/TEST-50-MULTINIC/client-init.sh
|
|
||||||
+++ b/test/TEST-50-MULTINIC/client-init.sh
|
|
||||||
@@ -105,7 +105,17 @@ export TERM=linux
|
|
||||||
export PS1='initramfs-test:\w\$ '
|
|
||||||
stty sane
|
|
||||||
echo "made it to the rootfs! Powering down."
|
|
||||||
+for i in /sys/class/net/*/
|
|
||||||
+do
|
|
||||||
+ # booting with network-manager module
|
|
||||||
+ state=/run/NetworkManager/devices/$(cat $i/ifindex)
|
|
||||||
+ grep -q connection-uuid= $state 2>/dev/null || continue
|
|
||||||
+ i=${i##*/}
|
|
||||||
+ ip link show $i |grep -q master && continue
|
|
||||||
+ IFACES+="$i "
|
|
||||||
+done
|
|
||||||
for i in /run/initramfs/net.*.did-setup; do
|
|
||||||
+ # booting with network-legacy module
|
|
||||||
[ -f "$i" ] || continue
|
|
||||||
strglobin "$i" ":*:*:*:*:" && continue
|
|
||||||
i=${i%.did-setup}
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
|||||||
From 08961eef2ad09e4ce38ee034baf4e8c2b3934cd1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
||||||
Date: Tue, 3 Sep 2019 10:44:36 -0500
|
|
||||||
Subject: [PATCH] modules.d: fix udev rules detection of multipath devices
|
|
||||||
|
|
||||||
Starting with the 0.7.7 release of the multipath tools, the multipath
|
|
||||||
udev rules always set a value in ENV{DM_MULTIPATH_DEVICE_PATH} for any
|
|
||||||
device that multipath scans. A value of 0 means that the device is not
|
|
||||||
claimed by multipath, and a value of 1 means that it is. Because of
|
|
||||||
this, udev rules that check ENV{DM_MULTIPATH_DEVICE_PATH}=="?*" will
|
|
||||||
always return True, and act as if every scanned device is claimed by
|
|
||||||
multipath. Checking ENV{DM_MULTIPATH_DEVICE_PATH}=="1" will work
|
|
||||||
correctly for both the old and new versions of the multipath tools.
|
|
||||||
---
|
|
||||||
modules.d/90dm/59-persistent-storage-dm.rules | 2 +-
|
|
||||||
modules.d/90dmraid/61-dmraid-imsm.rules | 2 +-
|
|
||||||
modules.d/90lvm/64-lvm.rules | 2 +-
|
|
||||||
modules.d/90mdraid/59-persistent-storage-md.rules | 2 +-
|
|
||||||
modules.d/90mdraid/65-md-incremental-imsm.rules | 2 +-
|
|
||||||
modules.d/95udev-rules/59-persistent-storage.rules | 2 +-
|
|
||||||
modules.d/95udev-rules/61-persistent-storage.rules | 2 +-
|
|
||||||
7 files changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90dm/59-persistent-storage-dm.rules b/modules.d/90dm/59-persistent-storage-dm.rules
|
|
||||||
index 73b09376..2be11227 100644
|
|
||||||
--- a/modules.d/90dm/59-persistent-storage-dm.rules
|
|
||||||
+++ b/modules.d/90dm/59-persistent-storage-dm.rules
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="dm_end"
|
|
||||||
ACTION!="add|change", GOTO="dm_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
|
||||||
|
|
||||||
KERNEL!="dm-[0-9]*", GOTO="dm_end"
|
|
||||||
ACTION=="add", GOTO="dm_end"
|
|
||||||
diff --git a/modules.d/90dmraid/61-dmraid-imsm.rules b/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
||||||
index 72267d3c..8a6b215e 100644
|
|
||||||
--- a/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
||||||
+++ b/modules.d/90dmraid/61-dmraid-imsm.rules
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="dm_end"
|
|
||||||
ACTION!="add|change", GOTO="dm_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="dm_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="dm_end"
|
|
||||||
|
|
||||||
ENV{ID_FS_TYPE}=="linux_raid_member", GOTO="dm_end"
|
|
||||||
|
|
||||||
diff --git a/modules.d/90lvm/64-lvm.rules b/modules.d/90lvm/64-lvm.rules
|
|
||||||
index 3ce0c1f6..65f65249 100644
|
|
||||||
--- a/modules.d/90lvm/64-lvm.rules
|
|
||||||
+++ b/modules.d/90lvm/64-lvm.rules
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="lvm_end"
|
|
||||||
ACTION!="add|change", GOTO="lvm_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="lvm_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
|
|
||||||
KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"
|
|
||||||
ENV{ID_FS_TYPE}!="LVM?_member", GOTO="lvm_end"
|
|
||||||
|
|
||||||
diff --git a/modules.d/90mdraid/59-persistent-storage-md.rules b/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
||||||
index 6ef858aa..96b10108 100644
|
|
||||||
--- a/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
||||||
+++ b/modules.d/90mdraid/59-persistent-storage-md.rules
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="md_end"
|
|
||||||
ACTION!="add|change", GOTO="md_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
|
||||||
|
|
||||||
KERNEL!="md[0-9]*|md_d[0-9]*|md/*", KERNEL!="md*", GOTO="md_end"
|
|
||||||
|
|
||||||
diff --git a/modules.d/90mdraid/65-md-incremental-imsm.rules b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
||||||
index d66dd012..52f5b195 100644
|
|
||||||
--- a/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
||||||
+++ b/modules.d/90mdraid/65-md-incremental-imsm.rules
|
|
||||||
@@ -9,7 +9,7 @@ KERNEL=="md*", ENV{ID_FS_TYPE}!="linux_raid_member", GOTO="md_end"
|
|
||||||
KERNEL=="md*", ACTION!="change", GOTO="md_end"
|
|
||||||
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="md_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="md_end"
|
|
||||||
|
|
||||||
ENV{ID_FS_TYPE}=="ddf_raid_member|isw_raid_member|linux_raid_member", GOTO="md_try"
|
|
||||||
GOTO="md_end"
|
|
||||||
diff --git a/modules.d/95udev-rules/59-persistent-storage.rules b/modules.d/95udev-rules/59-persistent-storage.rules
|
|
||||||
index 47ff6edd..8d8650f7 100644
|
|
||||||
--- a/modules.d/95udev-rules/59-persistent-storage.rules
|
|
||||||
+++ b/modules.d/95udev-rules/59-persistent-storage.rules
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="ps_end"
|
|
||||||
ACTION!="add|change", GOTO="ps_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="ps_end"
|
|
||||||
|
|
||||||
KERNEL=="cciss[0-9]*", IMPORT BLKID
|
|
||||||
KERNEL=="nbd[0-9]*", IMPORT BLKID
|
|
||||||
diff --git a/modules.d/95udev-rules/61-persistent-storage.rules b/modules.d/95udev-rules/61-persistent-storage.rules
|
|
||||||
index 37148b07..895ecebd 100644
|
|
||||||
--- a/modules.d/95udev-rules/61-persistent-storage.rules
|
|
||||||
+++ b/modules.d/95udev-rules/61-persistent-storage.rules
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
SUBSYSTEM!="block", GOTO="pss_end"
|
|
||||||
ACTION!="add|change", GOTO="pss_end"
|
|
||||||
# Also don't process disks that are slated to be a multipath device
|
|
||||||
-ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
|
|
||||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="pss_end"
|
|
||||||
|
|
||||||
ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
|
|
||||||
KERNEL=="cciss[0-9]*", GOTO="do_pss"
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From b59ae228851713f645751742136e34b854b0712a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Thu, 10 Nov 2016 13:57:26 +0100
|
|
||||||
Subject: [PATCH] test/test-rpms.txt: add list of rpms to install
|
|
||||||
|
|
||||||
(cherry picked from commit f432d367fc4fa7558761cb9bb4229e6c027bfa31)
|
|
||||||
---
|
|
||||||
test/test-rpms.txt | 26 ++++++++++++++++++++++++++
|
|
||||||
1 file changed, 26 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..1723d8e9
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/test-rpms.txt
|
|
||||||
@@ -0,0 +1,26 @@
|
|
||||||
+dash
|
|
||||||
+bridge-utils
|
|
||||||
+asciidoc
|
|
||||||
+mdadm
|
|
||||||
+lvm2
|
|
||||||
+dmraid
|
|
||||||
+cryptsetup
|
|
||||||
+nfs-utils
|
|
||||||
+nbd
|
|
||||||
+dhcp-server
|
|
||||||
+scsi-target-utils
|
|
||||||
+iscsi-initiator-utils
|
|
||||||
+net-tools
|
|
||||||
+strace
|
|
||||||
+syslinux
|
|
||||||
+python-imgcreate
|
|
||||||
+genisoimage
|
|
||||||
+btrfs-progs
|
|
||||||
+bridge-utils
|
|
||||||
+kmod-devel
|
|
||||||
+gcc
|
|
||||||
+bzip2
|
|
||||||
+xz
|
|
||||||
+tar
|
|
||||||
+wget
|
|
||||||
+rpm-build
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
From 4ef5cdc120bdbb348345c964a19affbb3ca1fa32 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Fri, 11 Nov 2016 11:40:58 +0100
|
|
||||||
Subject: [PATCH] test/test-rpms.txt: add gzip
|
|
||||||
|
|
||||||
(cherry picked from commit 7b4173d698be5163da1e5b5b52bafd2facba4db5)
|
|
||||||
---
|
|
||||||
test/test-rpms.txt | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
|
||||||
index 1723d8e9..10596da7 100644
|
|
||||||
--- a/test/test-rpms.txt
|
|
||||||
+++ b/test/test-rpms.txt
|
|
||||||
@@ -19,6 +19,7 @@ btrfs-progs
|
|
||||||
bridge-utils
|
|
||||||
kmod-devel
|
|
||||||
gcc
|
|
||||||
+gzip
|
|
||||||
bzip2
|
|
||||||
xz
|
|
||||||
tar
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
From fe44aa1b14f427245bdfb2026f2211a19b52f5e3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Harald Hoyer <harald@redhat.com>
|
|
||||||
Date: Fri, 11 Nov 2016 12:34:00 +0100
|
|
||||||
Subject: [PATCH] test-rpms.txt: add dhcp
|
|
||||||
|
|
||||||
(cherry picked from commit a081e072d894c91fcf037e267cb6793c4b0356c4)
|
|
||||||
---
|
|
||||||
test/test-rpms.txt | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
|
||||||
index 10596da7..95376bd2 100644
|
|
||||||
--- a/test/test-rpms.txt
|
|
||||||
+++ b/test/test-rpms.txt
|
|
||||||
@@ -8,6 +8,7 @@ cryptsetup
|
|
||||||
nfs-utils
|
|
||||||
nbd
|
|
||||||
dhcp-server
|
|
||||||
+dhcp
|
|
||||||
scsi-target-utils
|
|
||||||
iscsi-initiator-utils
|
|
||||||
net-tools
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
From 81babdedec8c6f7b23bbf0e3418126c4f9e5e15f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
||||||
Date: Tue, 10 Sep 2019 16:46:55 +0200
|
|
||||||
Subject: [PATCH] test-rpms.txt: add util-linux into the dependency list
|
|
||||||
|
|
||||||
---
|
|
||||||
test/test-rpms.txt | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/test/test-rpms.txt b/test/test-rpms.txt
|
|
||||||
index 95376bd2..02577c8a 100644
|
|
||||||
--- a/test/test-rpms.txt
|
|
||||||
+++ b/test/test-rpms.txt
|
|
||||||
@@ -26,3 +26,4 @@ xz
|
|
||||||
tar
|
|
||||||
wget
|
|
||||||
rpm-build
|
|
||||||
+util-linux
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 7843bc52777683f6a4ef953d8dde7171ff3b911c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Wed, 24 Jul 2019 16:45:19 +0200
|
|
||||||
Subject: [PATCH] [RHEL] network: default to network-legacy even in presence of
|
|
||||||
nm-initrd-generator
|
|
||||||
|
|
||||||
In RHEL 8.2, NetworkManager will ship with the nm-initrd-generator, but
|
|
||||||
before the install bits fall into place we want to default to network-legacy.
|
|
||||||
|
|
||||||
This unblocks the enablement of the NetworkManager bits and is intended
|
|
||||||
to be reverted later on.
|
|
||||||
---
|
|
||||||
modules.d/40network/module-setup.sh | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
|
||||||
index 8e2a74a3..bf252eb7 100755
|
|
||||||
--- a/modules.d/40network/module-setup.sh
|
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
|
||||||
@@ -8,9 +8,9 @@ check() {
|
|
||||||
# called by dracut
|
|
||||||
depends() {
|
|
||||||
echo -n "kernel-network-modules "
|
|
||||||
- if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then
|
|
||||||
- echo "network-manager"
|
|
||||||
- else
|
|
||||||
+ # RHEL 8.1: Default to network-legacy unless the user chose
|
|
||||||
+ # network-manager manually
|
|
||||||
+ if ! dracut_module_included "network-manager" ; then
|
|
||||||
echo "network-legacy"
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From dcbc74b01bfb360eecadb8e59480472b86fe63d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Tue, 29 Oct 2019 09:35:41 -0400
|
|
||||||
Subject: [PATCH] 01fips: fix HMAC file path resolution
|
|
||||||
|
|
||||||
There is a small regression in #343: when handling the 'separate boot
|
|
||||||
partition' case, we're checking for the kernel image in the wrong
|
|
||||||
location: `BOOT_IMAGE` is the `/boot`-relative path to the kernel image,
|
|
||||||
so `/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}` expands to e.g.
|
|
||||||
`/boot/mysubdir1/mysubdir2/mysubdir1/mysubdir2/vmlinuz...`.
|
|
||||||
|
|
||||||
We should be using `BOOT_IMAGE_NAME` here instead (and in fact, the next
|
|
||||||
if-statement does this correctly, so it might've just been accidentally
|
|
||||||
left out of #343).
|
|
||||||
---
|
|
||||||
modules.d/01fips/fips.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
||||||
index beaa692b..c3dbcf74 100755
|
|
||||||
--- a/modules.d/01fips/fips.sh
|
|
||||||
+++ b/modules.d/01fips/fips.sh
|
|
||||||
@@ -118,7 +118,7 @@ do_fips()
|
|
||||||
|
|
||||||
if [ -z "$BOOT_IMAGE_NAME" ]; then
|
|
||||||
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
|
|
||||||
- elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then
|
|
||||||
+ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
|
|
||||||
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
|
|
||||||
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
|
|
||||||
#on some achitectures BOOT_IMAGE does not contain path to kernel
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 14310ca42f06c2156ab5cefd05dbaa47ae3b054d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Tue, 29 Oct 2019 16:47:34 -0400
|
|
||||||
Subject: [PATCH] 01fips: run sha512hmac from directory HMAC file directory
|
|
||||||
|
|
||||||
That way, the HMAC file can contain a relative path instead of an
|
|
||||||
absolute one. The issue is that right now the kernel RPM bakes the
|
|
||||||
`/boot/vmlinuz-${kver}` path into the HMAC file which poses an issue for
|
|
||||||
rpm-ostree systems (and any other system where the kernel isn't simply
|
|
||||||
in the top-level `/boot`.
|
|
||||||
|
|
||||||
For now, we're hacking around this in rpm-ostree:
|
|
||||||
https://github.com/coreos/rpm-ostree/pull/1934
|
|
||||||
|
|
||||||
Though I'd like to propose the same change in the kernel spec file.
|
|
||||||
---
|
|
||||||
modules.d/01fips/fips.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
||||||
index c3dbcf74..893143d0 100755
|
|
||||||
--- a/modules.d/01fips/fips.sh
|
|
||||||
+++ b/modules.d/01fips/fips.sh
|
|
||||||
@@ -135,7 +135,7 @@ do_fips()
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1
|
|
||||||
+ (cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "All initrd crypto checks done"
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 89dcbbe92f008f6c4ebccfedf09d32bab4a575e5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Tue, 29 Oct 2019 16:53:00 -0400
|
|
||||||
Subject: [PATCH] 01fips: add / in BOOT_IMAGE_HMAC filename for clarity
|
|
||||||
|
|
||||||
It's already the case the `BOOT_IMAGE_PATH` today, in the non-empty
|
|
||||||
case, includes a trailing `/`, but let's add it to the path we build
|
|
||||||
here too to make it more obvious.
|
|
||||||
---
|
|
||||||
modules.d/01fips/fips.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
||||||
index 893143d0..de2755b0 100755
|
|
||||||
--- a/modules.d/01fips/fips.sh
|
|
||||||
+++ b/modules.d/01fips/fips.sh
|
|
||||||
@@ -129,7 +129,7 @@ do_fips()
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
- BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac"
|
|
||||||
+ BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac"
|
|
||||||
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
|
|
||||||
warn "${BOOT_IMAGE_HMAC} does not exist"
|
|
||||||
return 1
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 9e8f172dc01f7e013bb5d302ef6c90e2dc6b30c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Tue, 29 Oct 2019 16:54:10 -0400
|
|
||||||
Subject: [PATCH] 01fips: trim off GRUB boot device from BOOT_IMAGE
|
|
||||||
|
|
||||||
E.g. in RHCOS, the `BOOT_IMAGE` from the cmdline is:
|
|
||||||
|
|
||||||
(hd0,gpt1)/ostree/rhcos-e493371e5ee8407889029ec979955a2b86fd7e3cae5a0591b9db1cd248d966e8/vmlinuz-4.18.0-146.el8.x86_64
|
|
||||||
|
|
||||||
Which of course is a GRUB thing, not an actual pathname we'll be able to
|
|
||||||
resolve. In fact, we can simply scrap it off from the variable. Our code
|
|
||||||
is already able to handle both cases: whether the device refers to a
|
|
||||||
separate boot partition, or just the root filesystem with a regular
|
|
||||||
`/boot` directory.
|
|
||||||
---
|
|
||||||
modules.d/01fips/fips.sh | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
||||||
index de2755b0..559952ca 100755
|
|
||||||
--- a/modules.d/01fips/fips.sh
|
|
||||||
+++ b/modules.d/01fips/fips.sh
|
|
||||||
@@ -113,6 +113,10 @@ do_fips()
|
|
||||||
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
|
||||||
else
|
|
||||||
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
|
|
||||||
+
|
|
||||||
+ # Trim off any leading GRUB boot device (e.g. ($root) )
|
|
||||||
+ BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
|
|
||||||
+
|
|
||||||
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
|
|
||||||
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 346e57c1b6af4e2cfdbaae64941f2f3b8454a944 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Fri, 29 Nov 2019 13:29:23 +0100
|
|
||||||
Subject: [PATCH] always include sg module
|
|
||||||
|
|
||||||
RHEL-only
|
|
||||||
Resolves:#1579763
|
|
||||||
---
|
|
||||||
modules.d/00systemd/module-setup.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
|
||||||
index 1ed4b34f..ed177826 100755
|
|
||||||
--- a/modules.d/00systemd/module-setup.sh
|
|
||||||
+++ b/modules.d/00systemd/module-setup.sh
|
|
||||||
@@ -18,7 +18,7 @@ depends() {
|
|
||||||
}
|
|
||||||
|
|
||||||
installkernel() {
|
|
||||||
- hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256
|
|
||||||
+ hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256 sg
|
|
||||||
instmods -s efivarfs
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From 8061a432844d1f780d9b18144def0faef0145c0c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Mon, 7 Oct 2019 16:48:09 +0200
|
|
||||||
Subject: [PATCH] net-lib: check if addr exists before checking for dad state
|
|
||||||
|
|
||||||
Before we check if dad is done we should first make sure,
|
|
||||||
that there is a link local address where we do the check.
|
|
||||||
|
|
||||||
Due to this issue, on ipv6 only setups sometimes dhclient started
|
|
||||||
asking for ip address, before the link local address was present
|
|
||||||
and failed immediately.
|
|
||||||
|
|
||||||
(cherry picked from commit daa49cc2216d6387541ef36e8427081f6b02f224)
|
|
||||||
|
|
||||||
Resolves: #1765014
|
|
||||||
---
|
|
||||||
modules.d/40network/net-lib.sh | 6 ++++--
|
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index ad78d225..dcb53804 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -653,7 +653,8 @@ wait_for_ipv6_dad_link() {
|
|
||||||
timeout=$(($timeout*10))
|
|
||||||
|
|
||||||
while [ $cnt -lt $timeout ]; do
|
|
||||||
- [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
|
|
||||||
+ [ -n "$(ip -6 addr show dev "$1" scope link)" ] \
|
|
||||||
+ && [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
|
|
||||||
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
|
||||||
&& return 0
|
|
||||||
[ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
|
|
||||||
@@ -671,7 +672,8 @@ wait_for_ipv6_dad() {
|
|
||||||
timeout=$(($timeout*10))
|
|
||||||
|
|
||||||
while [ $cnt -lt $timeout ]; do
|
|
||||||
- [ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
|
||||||
+ [ -n "$(ip -6 addr show dev "$1")" ] \
|
|
||||||
+ && [ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
|
||||||
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
|
||||||
&& return 0
|
|
||||||
[ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
From 2caaf8b9ba5b95983154bd641f0f493ff1562cc0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Tue, 6 Aug 2019 15:39:31 +0800
|
|
||||||
Subject: [PATCH] 99squash: Only start the cleaner on switch-root
|
|
||||||
|
|
||||||
Currently it starts the cleaner early and do the clean up job if switch
|
|
||||||
root is called. It's better to just start the service only on switch
|
|
||||||
root to avoid any risk of service dependency failure and make is
|
|
||||||
simpler.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 5d88809319049eb06e3472dcd11cca9c4557d8c2)
|
|
||||||
|
|
||||||
Resolves: #1678248
|
|
||||||
---
|
|
||||||
modules.d/99squash/module-setup.sh | 3 ++-
|
|
||||||
modules.d/99squash/squash-mnt-clear.service | 11 ++++-------
|
|
||||||
2 files changed, 6 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
|
|
||||||
index 935fd721..e7e9ed8e 100644
|
|
||||||
--- a/modules.d/99squash/module-setup.sh
|
|
||||||
+++ b/modules.d/99squash/module-setup.sh
|
|
||||||
@@ -25,5 +25,6 @@ install() {
|
|
||||||
inst $moddir/init.sh /squash/init.sh
|
|
||||||
|
|
||||||
inst "$moddir/squash-mnt-clear.service" "$systemdsystemunitdir/squash-mnt-clear.service"
|
|
||||||
- ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd.target.wants/squash-mnt-clear.service"
|
|
||||||
+ mkdir -p "$initdir$systemdsystemunitdir/initrd-switch-root.target.wants"
|
|
||||||
+ ln_r "$systemdsystemunitdir/squash-mnt-clear.service" "$systemdsystemunitdir/initrd-switch-root.target.wants/squash-mnt-clear.service"
|
|
||||||
}
|
|
||||||
diff --git a/modules.d/99squash/squash-mnt-clear.service b/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
index f8d5db46..84441f60 100644
|
|
||||||
--- a/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
+++ b/modules.d/99squash/squash-mnt-clear.service
|
|
||||||
@@ -4,17 +4,14 @@
|
|
||||||
[Unit]
|
|
||||||
Description=Cleanup squashfs mounts when switch root
|
|
||||||
DefaultDependencies=no
|
|
||||||
-After=initrd.target
|
|
||||||
-After=dracut-initqueue.service dracut-pre-pivot.service
|
|
||||||
-Before=initrd-cleanup.service
|
|
||||||
+Before=initrd-switch-root.service
|
|
||||||
+After=initrd-switch-root.target
|
|
||||||
ConditionPathExists=/squash/root
|
|
||||||
-Conflicts=initrd-switch-root.target
|
|
||||||
-IgnoreOnIsolate=true
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
-RemainAfterExit=yes
|
|
||||||
+RemainAfterExit=no
|
|
||||||
StandardInput=null
|
|
||||||
StandardOutput=syslog+console
|
|
||||||
StandardError=syslog+console
|
|
||||||
-ExecStop=/squash/clear-squash.sh
|
|
||||||
+ExecStart=/squash/clear-squash.sh
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From ab679e91396a21489999c0acc9243415cb3235db Mon Sep 17 00:00:00 2001
|
|
||||||
From: Colin Walters <walters@verbum.org>
|
|
||||||
Date: Tue, 7 Jan 2020 20:53:53 +0000
|
|
||||||
Subject: [PATCH] modules/network-manager: Install `ip`
|
|
||||||
|
|
||||||
We don't need `ip` but having it is *really* useful for people debugging
|
|
||||||
in an emergency shell.
|
|
||||||
|
|
||||||
(cherry picked from commit 7fea85ce5f313445a260b5eb7bd7466217479d99)
|
|
||||||
|
|
||||||
Resolves: #1784358
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/module-setup.sh | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
|
|
||||||
index 62aba3c6..d6d0f9ce 100755
|
|
||||||
--- a/modules.d/35network-manager/module-setup.sh
|
|
||||||
+++ b/modules.d/35network-manager/module-setup.sh
|
|
||||||
@@ -26,7 +26,9 @@ install() {
|
|
||||||
|
|
||||||
_nm_version=$(NetworkManager --version)
|
|
||||||
|
|
||||||
- inst_multiple sed grep
|
|
||||||
+ # We don't need `ip` but having it is *really* useful for people debugging
|
|
||||||
+ # in an emergency shell.
|
|
||||||
+ inst_multiple ip sed grep
|
|
||||||
|
|
||||||
inst NetworkManager
|
|
||||||
inst /usr/libexec/nm-initrd-generator
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 7164155795f3f257cd119846de0b2a802a6a52c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Thu, 9 Jan 2020 10:49:52 +0100
|
|
||||||
Subject: [PATCH] network-legacy/ifup: dhclient should be started in oneshot
|
|
||||||
mode
|
|
||||||
|
|
||||||
since we handle the retries explicitly via rd.net.dhcp.retry
|
|
||||||
|
|
||||||
Without -1 if user sets ip=dhcp6 and there is no dhcp on the network,
|
|
||||||
dhclient seems to wait indefinitely, ignoring rd.net.timeout.dhcp
|
|
||||||
|
|
||||||
(cherry picked from commit 2181c80c91f05bfae5e50de2f502e363b0219bae)
|
|
||||||
|
|
||||||
Resolves: #1787620
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index b4f5bf10..bfb57ad5 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -52,6 +52,7 @@ do_dhcp() {
|
|
||||||
dhclient "$@" \
|
|
||||||
${_timeout:+-timeout $_timeout} \
|
|
||||||
-q \
|
|
||||||
+ -1 \
|
|
||||||
-cf /etc/dhclient.conf \
|
|
||||||
-pf /tmp/dhclient.$netif.pid \
|
|
||||||
-lf /tmp/dhclient.$netif.lease \
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From d20eb7b7b2a50f29ac02bd6b6d80113d495849ed Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Wed, 8 Jan 2020 16:20:29 +0100
|
|
||||||
Subject: [PATCH] network-legacy/ifup: fix typo when calling dhclient --timeout
|
|
||||||
|
|
||||||
(cherry picked from commit 212043f94dde1693d777e933945138747537f12f)
|
|
||||||
|
|
||||||
Resolves: #1787620
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index bfb57ad5..16b950be 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -50,7 +50,7 @@ do_dhcp() {
|
|
||||||
while [ $_COUNT -lt $_DHCPRETRY ]; do
|
|
||||||
info "Starting dhcp for interface $netif"
|
|
||||||
dhclient "$@" \
|
|
||||||
- ${_timeout:+-timeout $_timeout} \
|
|
||||||
+ ${_timeout:+--timeout $_timeout} \
|
|
||||||
-q \
|
|
||||||
-1 \
|
|
||||||
-cf /etc/dhclient.conf \
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From 46a8b8e9e7f150c2a17d4adeacb25ccf003ec425 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Tue, 21 Jan 2020 17:57:31 -0500
|
|
||||||
Subject: [PATCH] network-legacy/ifup: nuke pid and lease files if dhclient
|
|
||||||
failed
|
|
||||||
|
|
||||||
Otherwise we won't retry dhclient again on that interface. In
|
|
||||||
FCOS/RHCOS, we want to bake in `ip=dhcp,dhcp6` so we automatically try
|
|
||||||
getting a DHCPv6 lease if DHCPv4 failed.
|
|
||||||
|
|
||||||
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1793591
|
|
||||||
(cherry picked from commit d0de58f23252a9da4a8badd71777e7c8418fa4b7)
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index 16b950be..dd18d70b 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -62,6 +62,9 @@ do_dhcp() {
|
|
||||||
[ $_COUNT -lt $_DHCPRETRY ] && sleep 1
|
|
||||||
done
|
|
||||||
warn "dhcp for interface $netif failed"
|
|
||||||
+ # nuke those files since we failed; we might retry dhcp again if it's e.g.
|
|
||||||
+ # `ip=dhcp,dhcp6` and we check for the PID file at the top
|
|
||||||
+ rm -f /tmp/dhclient.$netif.{pid,lease}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 86d48f5c45d2d2c19cb575fa377763c069e57b8a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ondrej Dubaj <odubaj@redhat.com>
|
|
||||||
Date: Thu, 29 Aug 2019 14:31:06 +0200
|
|
||||||
Subject: [PATCH] added debug-shell to initrd in systemd version >= 240
|
|
||||||
|
|
||||||
---
|
|
||||||
dracut.spec | 2 +-
|
|
||||||
modules.d/00systemd/module-setup.sh | 4 ++++
|
|
||||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.spec b/dracut.spec
|
|
||||||
index 92c7f7bf..0f7eb4bf 100644
|
|
||||||
--- a/dracut.spec
|
|
||||||
+++ b/dracut.spec
|
|
||||||
@@ -88,7 +88,7 @@ Recommends: hardlink
|
|
||||||
Recommends: pigz
|
|
||||||
Recommends: kpartx
|
|
||||||
Requires: util-linux >= 2.21
|
|
||||||
-Requires: systemd >= 219
|
|
||||||
+Requires: systemd >= 239-23
|
|
||||||
Requires: systemd-udev >= 219
|
|
||||||
Requires: procps-ng
|
|
||||||
%else
|
|
||||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
|
||||||
index ed177826..e4a3f323 100755
|
|
||||||
--- a/modules.d/00systemd/module-setup.sh
|
|
||||||
+++ b/modules.d/00systemd/module-setup.sh
|
|
||||||
@@ -31,6 +31,10 @@ install() {
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
+ inst_multiple -o \
|
|
||||||
+ $systemdutildir/system-generators/systemd-debug-generator \
|
|
||||||
+ $systemdsystemunitdir/debug-shell.service
|
|
||||||
+
|
|
||||||
inst_multiple -o \
|
|
||||||
$systemdutildir/systemd \
|
|
||||||
$systemdutildir/systemd-coredump \
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 543b1cff3c84af062da4d27ba81a9d394f44e4b6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 11 Feb 2020 14:14:20 +0100
|
|
||||||
Subject: [PATCH] dhclient-script: ipv6 uses different variables for
|
|
||||||
nameservers
|
|
||||||
|
|
||||||
new_domain_name_servers and new_domain_search is only provided vit IPv4
|
|
||||||
|
|
||||||
see: https://src.fedoraproject.org/rpms/dhcp/blob/HEAD/f/dhclient-script#_148
|
|
||||||
(cherry picked from commit 962310483f473dbc8d71d70ba464d273b9808d31)
|
|
||||||
|
|
||||||
Resolves: #1795276
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/dhclient-script.sh | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh
|
|
||||||
index fc6ed0a3..f1a60005 100755
|
|
||||||
--- a/modules.d/35network-legacy/dhclient-script.sh
|
|
||||||
+++ b/modules.d/35network-legacy/dhclient-script.sh
|
|
||||||
@@ -75,8 +75,8 @@ setup_interface() {
|
|
||||||
|
|
||||||
setup_interface6() {
|
|
||||||
domain=$new_domain_name
|
|
||||||
- search=$(printf -- "$new_domain_search")
|
|
||||||
- namesrv=$new_domain_name_servers
|
|
||||||
+ search=$(printf -- "$new_dhcp6_domain_search")
|
|
||||||
+ namesrv=$new_dhcp6_name_servers
|
|
||||||
hostname=$new_host_name
|
|
||||||
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
|
|
||||||
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 3468310486d0da8d2a6c6bdcddc598b7b8ce5587 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Tue, 4 Feb 2020 14:18:01 +0100
|
|
||||||
Subject: [PATCH] Revert "wait for IPv6 RA if using none/static IPv6
|
|
||||||
assignment"
|
|
||||||
|
|
||||||
This reverts commit c603419030136570b5944dc4620f62d07b9e82bb.
|
|
||||||
|
|
||||||
wait_for_ipv6_dad_link is only called from dhclient script,
|
|
||||||
so the original intent "wait for IPv6 RA if using none/static IPv6 assignment"
|
|
||||||
does not seem to be correct.
|
|
||||||
|
|
||||||
Anyway, this brings an issue on isolated networks, where you don't
|
|
||||||
have any routes outside. dhclient-script hangs on this check
|
|
||||||
and after it times out, dhclient is able to set the address normally.
|
|
||||||
|
|
||||||
(cherry picked from commit 76f6566fd777e0ee20416061ecb795e8daef33e1)
|
|
||||||
|
|
||||||
Resolves: #1795276
|
|
||||||
---
|
|
||||||
modules.d/40network/net-lib.sh | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index dcb53804..0f3ca6a8 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -655,7 +655,6 @@ wait_for_ipv6_dad_link() {
|
|
||||||
while [ $cnt -lt $timeout ]; do
|
|
||||||
[ -n "$(ip -6 addr show dev "$1" scope link)" ] \
|
|
||||||
&& [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
|
|
||||||
- && [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
|
||||||
&& return 0
|
|
||||||
[ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
|
|
||||||
&& return 1
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From 7b14ab060e50d0035e4c0b1979d49234aa8896b0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Mon, 10 Feb 2020 14:03:30 +0100
|
|
||||||
Subject: [PATCH] 40network: bump rd.net.timeout.carrier to 10 seconds
|
|
||||||
|
|
||||||
On some devices kernel currently takes 5.2 seconds to detect carrier,
|
|
||||||
so let's make the default in dracut bit more sensible.
|
|
||||||
|
|
||||||
See also https://bugzilla.redhat.com/show_bug.cgi?id=1772010
|
|
||||||
|
|
||||||
(cherry picked from commit 579fbb9fc4205dc216b9642238739d898d2ed02d)
|
|
||||||
|
|
||||||
Resolves: #1798761
|
|
||||||
---
|
|
||||||
dracut.cmdline.7.asc | 2 +-
|
|
||||||
modules.d/40network/net-lib.sh | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
|
||||||
index 3cee5a00..ab9a24ad 100644
|
|
||||||
--- a/dracut.cmdline.7.asc
|
|
||||||
+++ b/dracut.cmdline.7.asc
|
|
||||||
@@ -645,7 +645,7 @@ NFS
|
|
||||||
Wait <seconds> until IPv6 automatic addresses are assigned. Default is 40 seconds.
|
|
||||||
|
|
||||||
**rd.net.timeout.carrier=**__<seconds>__::
|
|
||||||
- Wait <seconds> until carrier is recognized. Default is 5 seconds.
|
|
||||||
+ Wait <seconds> until carrier is recognized. Default is 10 seconds.
|
|
||||||
|
|
||||||
CIFS
|
|
||||||
~~~
|
|
||||||
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
||||||
index 0f3ca6a8..6babcccf 100755
|
|
||||||
--- a/modules.d/40network/net-lib.sh
|
|
||||||
+++ b/modules.d/40network/net-lib.sh
|
|
||||||
@@ -717,7 +717,7 @@ iface_has_carrier() {
|
|
||||||
interface="/sys/class/net/$interface"
|
|
||||||
[ -d "$interface" ] || return 2
|
|
||||||
local timeout="$(getargs rd.net.timeout.carrier=)"
|
|
||||||
- timeout=${timeout:-5}
|
|
||||||
+ timeout=${timeout:-10}
|
|
||||||
timeout=$(($timeout*10))
|
|
||||||
|
|
||||||
linkup "$1"
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From fa15223b70c04de0fdbd209a4bb1cb74876f7cfb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Wed, 19 Feb 2020 11:11:32 -0500
|
|
||||||
Subject: [PATCH] network-legacy/ifup: drop redundant if-statement
|
|
||||||
|
|
||||||
No need to check that `$ret` is 0, we're already running inside an
|
|
||||||
if-statement block which checks this.
|
|
||||||
|
|
||||||
(cherry picked from commit 7795fde44c54bfe753cc07999a4c2f9dd7e2820d)
|
|
||||||
|
|
||||||
Resolves: #1807395
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 10 ++++------
|
|
||||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index dd18d70b..eb7d2eb4 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -457,12 +457,10 @@ for p in $(getargs ip=); do
|
|
||||||
dhcp|on|any|dhcp6)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
- if [ $ret -eq 0 ]; then
|
|
||||||
- setup_net $netif
|
|
||||||
- source_hook initqueue/online $netif
|
|
||||||
- if [ -z "$manualup" ]; then
|
|
||||||
- /sbin/netroot $netif
|
|
||||||
- fi
|
|
||||||
+ setup_net $netif
|
|
||||||
+ source_hook initqueue/online $netif
|
|
||||||
+ if [ -z "$manualup" ]; then
|
|
||||||
+ /sbin/netroot $netif
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
From d6d50a239eebf9da13a0d7892df00a0e725ef9d6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
||||||
Date: Wed, 19 Feb 2020 10:44:24 -0500
|
|
||||||
Subject: [PATCH] network-legacy/ifup: fix ip=dhcp,dhcp6 setup_net logic
|
|
||||||
|
|
||||||
Previously, we were doing `setup_net` from `ifup` for any setup that
|
|
||||||
wasn't DHCP, since those are already taken care of by `dhclient-script`.
|
|
||||||
|
|
||||||
The issue is that the case-statement we use to detect this doesn't catch
|
|
||||||
options like `ip=dhcp,dhcp6`.
|
|
||||||
|
|
||||||
Fix this by reworking the logic here to just check if a
|
|
||||||
`setup_net_$netif.sh` hook exists. If so, then we know that `setup_net`
|
|
||||||
will be called for this interface later.
|
|
||||||
|
|
||||||
This was causing issues in RHCOS which now ships with `ip=dhcp,dhcp6` to
|
|
||||||
support IPv6 environments[1]. The code here would make us do `setup_net`
|
|
||||||
pre-emptively which IIUC would then cause the initqueue to finish
|
|
||||||
earlier even if we had more udev netif events to process.
|
|
||||||
|
|
||||||
[1] https://github.com/coreos/coreos-assembler/pull/1067
|
|
||||||
|
|
||||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1803926
|
|
||||||
(cherry picked from commit 4985aa8c6e89451996e659a39fec7646e9e25f76)
|
|
||||||
|
|
||||||
Cherry-picked from: 4985aa8c6e89451996e659a39fec7646e9e25f76
|
|
||||||
Resolves: #1807395
|
|
||||||
---
|
|
||||||
modules.d/35network-legacy/ifup.sh | 11 +++++------
|
|
||||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
|
|
||||||
index eb7d2eb4..61838741 100755
|
|
||||||
--- a/modules.d/35network-legacy/ifup.sh
|
|
||||||
+++ b/modules.d/35network-legacy/ifup.sh
|
|
||||||
@@ -453,17 +453,16 @@ for p in $(getargs ip=); do
|
|
||||||
> /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
|
||||||
fi
|
|
||||||
|
|
||||||
- case $autoconf in
|
|
||||||
- dhcp|on|any|dhcp6)
|
|
||||||
- ;;
|
|
||||||
- *)
|
|
||||||
+ # and finally, finish interface set up if there isn't already a script
|
|
||||||
+ # to do so (which is the case in the dhcp path)
|
|
||||||
+ if [ ! -e $hookdir/initqueue/setup_net_$netif.sh ]; then
|
|
||||||
setup_net $netif
|
|
||||||
source_hook initqueue/online $netif
|
|
||||||
if [ -z "$manualup" ]; then
|
|
||||||
/sbin/netroot $netif
|
|
||||||
fi
|
|
||||||
- ;;
|
|
||||||
- esac
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
exit $ret
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
From 07e7e84ebea1d76aeaa77d097b34503ec3c8f2e1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Wed, 30 Oct 2019 19:25:51 +0100
|
|
||||||
Subject: [PATCH] network-manager: fix getting of ifname from the sysfs path
|
|
||||||
|
|
||||||
commit 5e0f8c8a4ced ('network-manager: remove useless use of basename')
|
|
||||||
somewhat carelessly didn't take into account that $_i has a slash at
|
|
||||||
the end which made the result of the ## substitution be just an empty
|
|
||||||
string.
|
|
||||||
|
|
||||||
The slash was put to the end of /sys/class/net/*/ to make sure we're only
|
|
||||||
iterating directories, but it's not strictly necessary. In an unlikely case
|
|
||||||
something else than a directory appears in /sys/class/net/, we'll already deal
|
|
||||||
with it gracefully. Remove it.
|
|
||||||
|
|
||||||
This fixes the TEST-30-ISCSI test.
|
|
||||||
|
|
||||||
(cherry picked from commit 687e17aa7f2f40d21717be9a04302c749e139d4a)
|
|
||||||
|
|
||||||
Resolves: #1826061
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-run.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index a539d5b2..b33e0992 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -6,7 +6,7 @@ else
|
|
||||||
/usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
|
|
||||||
fi
|
|
||||||
|
|
||||||
-for _i in /sys/class/net/*/
|
|
||||||
+for _i in /sys/class/net/*
|
|
||||||
do
|
|
||||||
state=/run/NetworkManager/devices/$(cat $_i/ifindex)
|
|
||||||
grep -q connection-uuid= $state 2>/dev/null || continue
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
|||||||
From 02c096d138cc8c788daf5fae75408059cbc7e283 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Mon, 2 Dec 2019 02:19:51 +0100
|
|
||||||
Subject: [PATCH] network-manager: don't run NetworkManager when there are no
|
|
||||||
connections
|
|
||||||
|
|
||||||
NetworkManager would unnecessarily bring up the devices, colliding with
|
|
||||||
further attempts to rename the devices.
|
|
||||||
|
|
||||||
This is arguably a NetworkManager bug and should eventually be fixed there.
|
|
||||||
Running NetworkManager without the connection is unnecessary regardless.
|
|
||||||
|
|
||||||
(cherry picked from commit 5965710e018989b02a56e8d190b71740ca3b5463)
|
|
||||||
|
|
||||||
Resolves: #1826061
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-run.sh | 17 ++++++++++++-----
|
|
||||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index b33e0992..4079b735 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -1,10 +1,17 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
-if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
|
|
||||||
- /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
|
|
||||||
-else
|
|
||||||
- /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
|
|
||||||
-fi
|
|
||||||
+for i in /usr/lib/NetworkManager/system-connections/* \
|
|
||||||
+ /run/NetworkManager/system-connections/* \
|
|
||||||
+ /etc/NetworkManager/system-connections/* \
|
|
||||||
+ /etc/sysconfig/network-scripts/ifcfg-*; do
|
|
||||||
+ [ -f "$i" ] || continue
|
|
||||||
+ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
|
|
||||||
+ /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
|
|
||||||
+ else
|
|
||||||
+ /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
|
|
||||||
+ fi
|
|
||||||
+ break
|
|
||||||
+done
|
|
||||||
|
|
||||||
for _i in /sys/class/net/*
|
|
||||||
do
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From b692dbc7f2c6a3fb4fa587d9d63b80e4626dafae Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
Date: Wed, 11 Mar 2020 09:40:50 +0100
|
|
||||||
Subject: [PATCH] network-manager: ensure that nm-run.sh is executed when
|
|
||||||
needed
|
|
||||||
|
|
||||||
The network-manager command line hook must install a
|
|
||||||
initqueue/finished hook to ensure that nm-run.sh is executed when
|
|
||||||
there are network connections to activate.
|
|
||||||
|
|
||||||
Fixes: #694
|
|
||||||
(cherry picked from commit 3dcaa97ca4dcfa8092252a22df62c60941e59ce3)
|
|
||||||
|
|
||||||
Resolves: #1826061
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/nm-config.sh | 11 +++++++++++
|
|
||||||
modules.d/35network-manager/nm-run.sh | 2 ++
|
|
||||||
2 files changed, 13 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/nm-config.sh b/modules.d/35network-manager/nm-config.sh
|
|
||||||
index 1efa737c..39a1c8bd 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-config.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-config.sh
|
|
||||||
@@ -5,3 +5,14 @@ if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/libexec/nm-initrd-generator -- $(getcmdline)
|
|
||||||
+
|
|
||||||
+if getargbool 0 rd.neednet; then
|
|
||||||
+ for i in /usr/lib/NetworkManager/system-connections/* \
|
|
||||||
+ /run/NetworkManager/system-connections/* \
|
|
||||||
+ /etc/NetworkManager/system-connections/* \
|
|
||||||
+ /etc/sysconfig/network-scripts/ifcfg-*; do
|
|
||||||
+ [ -f "$i" ] || continue
|
|
||||||
+ echo '[ -f /tmp/nm.done ]' >$hookdir/initqueue/finished/nm.sh
|
|
||||||
+ break
|
|
||||||
+ done
|
|
||||||
+fi
|
|
||||||
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
|
|
||||||
index 4079b735..fc5280a1 100755
|
|
||||||
--- a/modules.d/35network-manager/nm-run.sh
|
|
||||||
+++ b/modules.d/35network-manager/nm-run.sh
|
|
||||||
@@ -22,3 +22,5 @@ do
|
|
||||||
source_hook initqueue/online $ifname
|
|
||||||
/sbin/netroot $ifname
|
|
||||||
done
|
|
||||||
+
|
|
||||||
+> /tmp/nm.done
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 1ade0d247fda747ed33632a7746f9278b74feaa8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
||||||
Date: Mon, 23 Mar 2020 22:57:35 +0100
|
|
||||||
Subject: [PATCH] network-manager: install libnss DNS and mDNS plugins
|
|
||||||
|
|
||||||
Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name
|
|
||||||
Service Switch (NSS) functionality of glibc so that name resolution
|
|
||||||
through /etc/resolv.conf and mDNS works in the initrd.
|
|
||||||
|
|
||||||
Fixes: #772
|
|
||||||
|
|
||||||
Cherry-picked from: 87bffc36e72c121024df033e1a78799456c73523
|
|
||||||
Resolves: #1826061
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/module-setup.sh | 5 +++++
|
|
||||||
1 file changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
|
|
||||||
index d6d0f9ce..8fc3114d 100755
|
|
||||||
--- a/modules.d/35network-manager/module-setup.sh
|
|
||||||
+++ b/modules.d/35network-manager/module-setup.sh
|
|
||||||
@@ -51,4 +51,9 @@ install() {
|
|
||||||
if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then
|
|
||||||
inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so"
|
|
||||||
fi
|
|
||||||
+
|
|
||||||
+ _arch=${DRACUT_ARCH:-$(uname -m)}
|
|
||||||
+
|
|
||||||
+ inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
|
||||||
+ {"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*"
|
|
||||||
}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 0945c8070e436eef908a1f88c946df6c27d3bc41 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Georg <peter.georg@physik.uni-regensburg.de>
|
|
||||||
Date: Tue, 21 Apr 2020 21:34:38 +0200
|
|
||||||
Subject: [PATCH] Always pull in machinery to read ifcfg files
|
|
||||||
|
|
||||||
So far machinery is only pulled in if the user has not yet included any
|
|
||||||
ifcfg files.
|
|
||||||
|
|
||||||
(cherry picked from commit faea4e4ddb10f697590b80f8f17181341c537262)
|
|
||||||
|
|
||||||
Resolves: #1826061
|
|
||||||
---
|
|
||||||
modules.d/35network-manager/module-setup.sh | 6 ++----
|
|
||||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/35network-manager/module-setup.sh b/modules.d/35network-manager/module-setup.sh
|
|
||||||
index 8fc3114d..ad2a1534 100755
|
|
||||||
--- a/modules.d/35network-manager/module-setup.sh
|
|
||||||
+++ b/modules.d/35network-manager/module-setup.sh
|
|
||||||
@@ -47,10 +47,8 @@ install() {
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We don't install the ifcfg files from the host automatically.
|
|
||||||
- # But if the user chooses to include them, we pull in the machinery to read them.
|
|
||||||
- if ! [[ -d "$initdir/etc/sysconfig/network-scripts" ]]; then
|
|
||||||
- inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so"
|
|
||||||
- fi
|
|
||||||
+ # But the user might choose to include them, so we pull in the machinery to read them.
|
|
||||||
+ inst_libdir_file "NetworkManager/$_nm_version/libnm-settings-plugin-ifcfg-rh.so"
|
|
||||||
|
|
||||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
|
||||||
|
|
||||||
|
|
@ -1,426 +0,0 @@
|
|||||||
From cf74193cc37f2ace1197b1e6ebacc6fe542767c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 8 Apr 2020 16:39:52 +0800
|
|
||||||
Subject: [PATCH] Remove memtrace-ko and rd.memdebug=4 support in dracut
|
|
||||||
|
|
||||||
This feature could be off loaded to memstrack, which have better
|
|
||||||
accurecy, better performance, and have more detailed tracing features.
|
|
||||||
|
|
||||||
Also simplify make_trace_mem a bit.
|
|
||||||
|
|
||||||
And currently rd.memdebug=4 is unstable, fails from time to time.
|
|
||||||
|
|
||||||
(cherry picked from commit 49c4172f4eef6e2015615e132b199a7ec0699ffc)
|
|
||||||
|
|
||||||
Resolves: #1829528
|
|
||||||
---
|
|
||||||
dracut.cmdline.7.asc | 4 +-
|
|
||||||
modules.d/98dracut-systemd/dracut-cmdline.sh | 2 +-
|
|
||||||
modules.d/98dracut-systemd/dracut-pre-mount.sh | 2 +-
|
|
||||||
modules.d/98dracut-systemd/dracut-pre-pivot.sh | 2 +-
|
|
||||||
modules.d/98dracut-systemd/dracut-pre-trigger.sh | 2 +-
|
|
||||||
modules.d/99base/dracut-lib.sh | 44 +-----
|
|
||||||
modules.d/99base/init.sh | 8 +-
|
|
||||||
modules.d/99base/memtrace-ko.sh | 191 -----------------------
|
|
||||||
modules.d/99base/module-setup.sh | 1 -
|
|
||||||
9 files changed, 18 insertions(+), 238 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
|
||||||
index ab9a24ad..0dc58d1a 100644
|
|
||||||
--- a/dracut.cmdline.7.asc
|
|
||||||
+++ b/dracut.cmdline.7.asc
|
|
||||||
@@ -187,9 +187,9 @@ It should be attached to any report about dracut problems.
|
|
||||||
_/run/initramfs/init.log_.
|
|
||||||
If "quiet" is set, it also logs to the console.
|
|
||||||
|
|
||||||
-**rd.memdebug=[0-4]**::
|
|
||||||
+**rd.memdebug=[0-3]**::
|
|
||||||
Print memory usage info at various points, set the verbose level from 0 to 4.
|
|
||||||
-+
|
|
||||||
++
|
|
||||||
Higher level means more debugging output:
|
|
||||||
+
|
|
||||||
----
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-cmdline.sh b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
index bff9435a..6c6ee026 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-cmdline.sh
|
|
||||||
@@ -42,7 +42,7 @@ export root
|
|
||||||
export rflags
|
|
||||||
export fstype
|
|
||||||
|
|
||||||
-make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab'
|
|
||||||
# run scriptlets to parse the command line
|
|
||||||
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
|
||||||
source_hook cmdline
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-mount.sh b/modules.d/98dracut-systemd/dracut-pre-mount.sh
|
|
||||||
index a3b9d291..ae511286 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-pre-mount.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-pre-mount.sh
|
|
||||||
@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
|
||||||
|
|
||||||
-make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
# pre pivot scripts are sourced just before we doing cleanup and switch over
|
|
||||||
# to the new root.
|
|
||||||
getarg 'rd.break=pre-mount' 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-pivot.sh b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
|
||||||
index dc9a2504..96e6f8ca 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-pre-pivot.sh
|
|
||||||
@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
|
||||||
|
|
||||||
-make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
# pre pivot scripts are sourced just before we doing cleanup and switch over
|
|
||||||
# to the new root.
|
|
||||||
getarg 'rd.break=pre-pivot' 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot"
|
|
||||||
diff --git a/modules.d/98dracut-systemd/dracut-pre-trigger.sh b/modules.d/98dracut-systemd/dracut-pre-trigger.sh
|
|
||||||
index 7cd821ed..a1a33960 100755
|
|
||||||
--- a/modules.d/98dracut-systemd/dracut-pre-trigger.sh
|
|
||||||
+++ b/modules.d/98dracut-systemd/dracut-pre-trigger.sh
|
|
||||||
@@ -8,7 +8,7 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
|
|
||||||
source_conf /etc/conf.d
|
|
||||||
|
|
||||||
-make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
|
|
||||||
source_hook pre-trigger
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
||||||
index f71e757c..502c7568 100755
|
|
||||||
--- a/modules.d/99base/dracut-lib.sh
|
|
||||||
+++ b/modules.d/99base/dracut-lib.sh
|
|
||||||
@@ -1220,50 +1220,25 @@ are_lists_eq() {
|
|
||||||
|
|
||||||
setmemdebug() {
|
|
||||||
if [ -z "$DEBUG_MEM_LEVEL" ]; then
|
|
||||||
- export DEBUG_MEM_LEVEL=$(getargnum 0 0 4 rd.memdebug)
|
|
||||||
+ export DEBUG_MEM_LEVEL=$(getargnum 0 0 3 rd.memdebug)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
setmemdebug
|
|
||||||
|
|
||||||
-cleanup_trace_mem()
|
|
||||||
-{
|
|
||||||
- # tracekomem based on kernel trace needs cleanup after use.
|
|
||||||
- if [ "$DEBUG_MEM_LEVEL" -eq 4 ]; then
|
|
||||||
- tracekomem --cleanup
|
|
||||||
- fi
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-# parameters: msg [trace_level:trace]...
|
|
||||||
-make_trace_mem()
|
|
||||||
-{
|
|
||||||
- local msg
|
|
||||||
- msg="$1"
|
|
||||||
- shift
|
|
||||||
- if [ -n "$DEBUG_MEM_LEVEL" ] && [ "$DEBUG_MEM_LEVEL" -gt 0 ]; then
|
|
||||||
- make_trace show_memstats $DEBUG_MEM_LEVEL "[debug_mem]" "$msg" "$@" >&2
|
|
||||||
- fi
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
# parameters: func log_level prefix msg [trace_level:trace]...
|
|
||||||
-make_trace()
|
|
||||||
+make_trace_mem()
|
|
||||||
{
|
|
||||||
- local func log_level prefix msg msg_printed
|
|
||||||
+ local log_level prefix msg msg_printed
|
|
||||||
local trace trace_level trace_in_higher_levels insert_trace
|
|
||||||
|
|
||||||
- func=$1
|
|
||||||
- shift
|
|
||||||
-
|
|
||||||
- log_level=$1
|
|
||||||
- shift
|
|
||||||
-
|
|
||||||
- prefix=$1
|
|
||||||
- shift
|
|
||||||
-
|
|
||||||
msg=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
- if [ -z "$log_level" ]; then
|
|
||||||
+ prefix='[debug_mem]'
|
|
||||||
+ log_level=$DEBUG_MEM_LEVEL
|
|
||||||
+
|
|
||||||
+ if [ -z "$log_level" ] || [ "$log_level" -le 0 ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1296,7 +1271,7 @@ make_trace()
|
|
||||||
echo "$prefix $msg"
|
|
||||||
msg_printed=1
|
|
||||||
fi
|
|
||||||
- $func $trace
|
|
||||||
+ show_memstats $trace
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
@@ -1318,9 +1293,6 @@ show_memstats()
|
|
||||||
iomem)
|
|
||||||
cat /proc/iomem
|
|
||||||
;;
|
|
||||||
- komem)
|
|
||||||
- tracekomem
|
|
||||||
- ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
|
|
||||||
index e4f7cff1..2c0ccd66 100755
|
|
||||||
--- a/modules.d/99base/init.sh
|
|
||||||
+++ b/modules.d/99base/init.sh
|
|
||||||
@@ -131,7 +131,7 @@ if ! getargbool 1 'rd.hostonly'; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# run scriptlets to parse the command line
|
|
||||||
-make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook cmdline" '1+:mem' '1+:iomem' '3+:slab'
|
|
||||||
getarg 'rd.break=cmdline' -d 'rdbreak=cmdline' && emergency_shell -n cmdline "Break before cmdline"
|
|
||||||
source_hook cmdline
|
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ fi
|
|
||||||
|
|
||||||
udevproperty "hookdir=$hookdir"
|
|
||||||
|
|
||||||
-make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-trigger" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
getarg 'rd.break=pre-trigger' -d 'rdbreak=pre-trigger' && emergency_shell -n pre-trigger "Break before pre-trigger"
|
|
||||||
source_hook pre-trigger
|
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ unset RDRETRY
|
|
||||||
|
|
||||||
# pre-mount happens before we try to mount the root filesystem,
|
|
||||||
# and happens once.
|
|
||||||
-make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-mount" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
getarg 'rd.break=pre-mount' -d 'rdbreak=pre-mount' && emergency_shell -n pre-mount "Break pre-mount"
|
|
||||||
source_hook pre-mount
|
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ done
|
|
||||||
|
|
||||||
# pre pivot scripts are sourced just before we doing cleanup and switch over
|
|
||||||
# to the new root.
|
|
||||||
-make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab' '4+:komem'
|
|
||||||
+make_trace_mem "hook pre-pivot" '1:shortmem' '2+:mem' '3+:slab'
|
|
||||||
getarg 'rd.break=pre-pivot' -d 'rdbreak=pre-pivot' && emergency_shell -n pre-pivot "Break pre-pivot"
|
|
||||||
source_hook pre-pivot
|
|
||||||
|
|
||||||
diff --git a/modules.d/99base/memtrace-ko.sh b/modules.d/99base/memtrace-ko.sh
|
|
||||||
deleted file mode 100755
|
|
||||||
index ee035e15..00000000
|
|
||||||
--- a/modules.d/99base/memtrace-ko.sh
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,191 +0,0 @@
|
|
||||||
-#!/bin/sh
|
|
||||||
-
|
|
||||||
-# Try to find out kernel modules with large total memory allocation during loading.
|
|
||||||
-# For large slab allocation, it will fall into buddy, also not trace "mm_page_free"
|
|
||||||
-# considering large free is quite rare for module_init, thus saving tons of events
|
|
||||||
-# to avoid trace data overwritten.
|
|
||||||
-#
|
|
||||||
-# Therefore, tracing "mm_page_alloc"alone should be enough for the purpose.
|
|
||||||
-
|
|
||||||
-# "sys/kernel/tracing" has the priority if exists.
|
|
||||||
-get_trace_base() {
|
|
||||||
- # trace access through debugfs would be obsolete if "/sys/kernel/tracing" is available.
|
|
||||||
- if [ -d "/sys/kernel/tracing" ]; then
|
|
||||||
- echo "/sys/kernel"
|
|
||||||
- else
|
|
||||||
- echo "/sys/kernel/debug"
|
|
||||||
- fi
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-# We want to enable these trace events.
|
|
||||||
-get_want_events() {
|
|
||||||
- echo "module:module_put module:module_load kmem:mm_page_alloc"
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-get_event_filter() {
|
|
||||||
- echo "comm == systemd-udevd || comm == modprobe || comm == insmod"
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-is_trace_ready() {
|
|
||||||
- local trace_base want_events current_events
|
|
||||||
-
|
|
||||||
- trace_base=$(get_trace_base)
|
|
||||||
- ! [ -f "$trace_base/tracing/trace" ] && return 1
|
|
||||||
-
|
|
||||||
- [ "$(cat $trace_base/tracing/tracing_on)" -eq 0 ] && return 1
|
|
||||||
-
|
|
||||||
- # Also check if trace events were properly setup.
|
|
||||||
- want_events=$(get_want_events)
|
|
||||||
- current_events=$(echo $(cat $trace_base/tracing/set_event))
|
|
||||||
- [ "$current_events" != "$want_events" ] && return 1
|
|
||||||
-
|
|
||||||
- return 0
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-prepare_trace() {
|
|
||||||
- local trace_base
|
|
||||||
-
|
|
||||||
- trace_base=$(get_trace_base)
|
|
||||||
- # old debugfs interface case.
|
|
||||||
- if ! [ -d "$trace_base/tracing" ]; then
|
|
||||||
- mount none -t debugfs $trace_base
|
|
||||||
- # new tracefs interface case.
|
|
||||||
- elif ! [ -f "$trace_base/tracing/trace" ]; then
|
|
||||||
- mount none -t tracefs "$trace_base/tracing"
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if ! [ -f "$trace_base/tracing/trace" ]; then
|
|
||||||
- echo "WARN: Mount trace failed for kernel module memory analyzing."
|
|
||||||
- return 1
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- # Active all the wanted trace events.
|
|
||||||
- echo "$(get_want_events)" > $trace_base/tracing/set_event
|
|
||||||
-
|
|
||||||
- # There are three kinds of known applications for module loading:
|
|
||||||
- # "systemd-udevd", "modprobe" and "insmod".
|
|
||||||
- # Set them as the global events filter.
|
|
||||||
- # NOTE: Some kernel may not support this format of filter, anyway
|
|
||||||
- # the operation will fail and it doesn't matter.
|
|
||||||
- echo "$(get_event_filter)" > $trace_base/tracing/events/kmem/filter 2>&1
|
|
||||||
- echo "$(get_event_filter)" > $trace_base/tracing/events/module/filter 2>&1
|
|
||||||
-
|
|
||||||
- # Set the number of comm-pid if supported.
|
|
||||||
- if [ -f "$trace_base/tracing/saved_cmdlines_size" ]; then
|
|
||||||
- # Thanks to filters, 4096 is big enough(also well supported).
|
|
||||||
- echo 4096 > $trace_base/tracing/saved_cmdlines_size
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- # Enable and clear trace data for the first time.
|
|
||||||
- echo 1 > $trace_base/tracing/tracing_on
|
|
||||||
- echo > $trace_base/tracing/trace
|
|
||||||
- echo "Prepare trace success."
|
|
||||||
- return 0
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-order_to_pages()
|
|
||||||
-{
|
|
||||||
- local pages=1
|
|
||||||
- local order=$1
|
|
||||||
-
|
|
||||||
- while [ "$order" != 0 ]; do
|
|
||||||
- order=$((order-1))
|
|
||||||
- pages=$(($pages*2))
|
|
||||||
- done
|
|
||||||
-
|
|
||||||
- echo $pages
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-parse_trace_data() {
|
|
||||||
- local module_name tmp_eval pages
|
|
||||||
-
|
|
||||||
- cat "$(get_trace_base)/tracing/trace" | while read pid cpu flags ts function args
|
|
||||||
- do
|
|
||||||
- # Skip comment lines
|
|
||||||
- if [ "$pid" = "#" ]; then
|
|
||||||
- continue
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- pid=${pid##*-}
|
|
||||||
- function=${function%:}
|
|
||||||
- if [ "$function" = "module_load" ]; then
|
|
||||||
- # One module is being loaded, save the task pid for tracking.
|
|
||||||
- # Remove the trailing after whitespace, there may be the module flags.
|
|
||||||
- module_name=${args%% *}
|
|
||||||
- # Mark current_module to track the task.
|
|
||||||
- eval current_module_$pid="$module_name"
|
|
||||||
- tmp_eval=$(eval echo '${module_loaded_'${module_name}'}')
|
|
||||||
- if [ -n "$tmp_eval" ]; then
|
|
||||||
- echo "WARN: \"$module_name\" was loaded multiple times!"
|
|
||||||
- fi
|
|
||||||
- eval unset module_loaded_$module_name
|
|
||||||
- eval nr_alloc_pages_$module_name=0
|
|
||||||
- continue
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- module_name=$(eval echo '${current_module_'${pid}'}')
|
|
||||||
- if [ -z "$module_name" ]; then
|
|
||||||
- continue
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- # Once we get here, the task is being tracked(is loading a module).
|
|
||||||
- if [ "$function" = "module_put" ]; then
|
|
||||||
- # Mark the module as loaded when the first module_put event happens after module_load.
|
|
||||||
- tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}')
|
|
||||||
- echo "$tmp_eval pages consumed by \"$module_name\""
|
|
||||||
- eval module_loaded_$module_name=1
|
|
||||||
- # Module loading finished, so untrack the task.
|
|
||||||
- eval unset current_module_$pid
|
|
||||||
- eval unset nr_alloc_pages_$module_name
|
|
||||||
- continue
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- if [ "$function" = "mm_page_alloc" ]; then
|
|
||||||
- # Get order first, then convert to actual pages.
|
|
||||||
- pages=$(echo $args | sed -e 's/.*order=\([0-9]*\) .*/\1/')
|
|
||||||
- pages=$(order_to_pages "$pages")
|
|
||||||
- tmp_eval=$(eval echo '${nr_alloc_pages_'${module_name}'}')
|
|
||||||
- eval nr_alloc_pages_$module_name="$(($tmp_eval+$pages))"
|
|
||||||
- fi
|
|
||||||
- done
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-cleanup_trace() {
|
|
||||||
- local trace_base
|
|
||||||
-
|
|
||||||
- if is_trace_ready; then
|
|
||||||
- trace_base=$(get_trace_base)
|
|
||||||
- echo 0 > $trace_base/tracing/tracing_on
|
|
||||||
- echo > $trace_base/tracing/trace
|
|
||||||
- echo > $trace_base/tracing/set_event
|
|
||||||
- echo 0 > $trace_base/tracing/events/kmem/filter
|
|
||||||
- echo 0 > $trace_base/tracing/events/module/filter
|
|
||||||
- fi
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-show_usage() {
|
|
||||||
- echo "Find out kernel modules with large memory consumption during loading based on trace."
|
|
||||||
- echo "Usage:"
|
|
||||||
- echo "1) run it first to setup trace."
|
|
||||||
- echo "2) run again to parse the trace data if any."
|
|
||||||
- echo "3) run with \"--cleanup\" option to cleanup trace after use."
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-if [ "$1" = "--help" ]; then
|
|
||||||
- show_usage
|
|
||||||
- exit 0
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if [ "$1" = "--cleanup" ]; then
|
|
||||||
- cleanup_trace
|
|
||||||
- exit 0
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-if is_trace_ready ; then
|
|
||||||
- echo "tracekomem - Rough memory consumption by loading kernel modules (larger value with better accuracy)"
|
|
||||||
- parse_trace_data
|
|
||||||
-else
|
|
||||||
- prepare_trace
|
|
||||||
-fi
|
|
||||||
-
|
|
||||||
-exit $?
|
|
||||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
|
||||||
index c9ead01d..3578643c 100755
|
|
||||||
--- a/modules.d/99base/module-setup.sh
|
|
||||||
+++ b/modules.d/99base/module-setup.sh
|
|
||||||
@@ -35,7 +35,6 @@ install() {
|
|
||||||
inst_script "$moddir/initqueue.sh" "/sbin/initqueue"
|
|
||||||
inst_script "$moddir/loginit.sh" "/sbin/loginit"
|
|
||||||
inst_script "$moddir/rdsosreport.sh" "/sbin/rdsosreport"
|
|
||||||
- inst_script "$moddir/memtrace-ko.sh" "/sbin/tracekomem"
|
|
||||||
|
|
||||||
[ -e "${initdir}/lib" ] || mkdir -m 0755 -p ${initdir}/lib
|
|
||||||
mkdir -m 0755 -p ${initdir}/lib/dracut
|
|
||||||
|
|
@ -1,320 +0,0 @@
|
|||||||
From adacd8101e7558930e4499c21006eaa14629c234 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 8 Apr 2020 20:09:38 +0800
|
|
||||||
Subject: [PATCH] Add 99memstrack module
|
|
||||||
|
|
||||||
memstrack is a new tool to track the overall memory usage and
|
|
||||||
allocation, which can help off load the improve the builtin module
|
|
||||||
memory tracing function in dracut.
|
|
||||||
|
|
||||||
With this change, the rd.memdebug=4 behavior is similiar with before,
|
|
||||||
but the report is defered to pre-pivot, so the memory usage info
|
|
||||||
during the whole initramfs run is traced. And the ourput format is
|
|
||||||
changed a bit:
|
|
||||||
|
|
||||||
dracut-pre-pivot[519]: ======== Report format module_summary: ========
|
|
||||||
dracut-pre-pivot[519]: Module squashfs using 10.4MB (2658 pages), peak allocation 10.4MB (2671 pages)
|
|
||||||
dracut-pre-pivot[519]: Module qxl using 3.4MB (865 pages), peak allocation 3.4MB (880 pages)
|
|
||||||
dracut-pre-pivot[519]: Module crc32c_intel using 2.0MB (519 pages), peak allocation 3.0MB (769 pages)
|
|
||||||
dracut-pre-pivot[519]: Module serio_raw using 2.0MB (505 pages), peak allocation 3.6MB (918 pages)
|
|
||||||
dracut-pre-pivot[519]: Module virtio_console using 1.6MB (416 pages), peak allocation 1.6MB (419 pages)
|
|
||||||
... snip ...
|
|
||||||
dracut-pre-pivot[519]: ======== Report format module_summary END ========
|
|
||||||
|
|
||||||
It now contains more detail and also includes the peak usage which could
|
|
||||||
be more helpful.
|
|
||||||
|
|
||||||
And now it have a rd.memdebug=5, which will print more detail about
|
|
||||||
the stack trace of the top memory user, also printed on pri-pivot:
|
|
||||||
|
|
||||||
dracut-pre-pivot[519]: ======== Report format module_top: ========
|
|
||||||
dracut-pre-pivot[519]: Top stack usage of module squashfs:
|
|
||||||
dracut-pre-pivot[519]: (null) Pages: 2658 (peak: 2671)
|
|
||||||
dracut-pre-pivot[519]: (null) Pages: 2658 (peak: 2671)
|
|
||||||
dracut-pre-pivot[519]: async_page_fault (0xffffffff81a01149) Pages: 1448 (peak: 1461)
|
|
||||||
dracut-pre-pivot[519]: do_async_page_fault (0xffffffff8105c509) Pages: 1448 (peak: 1461)
|
|
||||||
dracut-pre-pivot[519]: do_page_fault (0xffffffff8106296a) Pages: 1448 (peak: 1461)
|
|
||||||
dracut-pre-pivot[519]: do_user_addr_fault (0xffffffff810626bd) Pages: 1448 (peak: 1461)
|
|
||||||
dracut-pre-pivot[519]: handle_mm_fault (0xffffffff812940c4) Pages: 1448 (peak: 1461)
|
|
||||||
dracut-pre-pivot[519]: __handle_mm_fault (0xffffffff81293627) Pages: 1195 (peak: 1208)
|
|
||||||
dracut-pre-pivot[519]: __do_fault (0xffffffff8128b07e) Pages: 1195 (peak: 1208)
|
|
||||||
dracut-pre-pivot[519]: filemap_fault (0xffffffff8124c0b9) Pages: 1195 (peak: 1208)
|
|
||||||
dracut-pre-pivot[519]: __do_page_cache_readahead (0xffffffff812585da) Pages: 1063 (peak: 1076)
|
|
||||||
dracut-pre-pivot[519]: read_pages (0xffffffff812583c2) Pages: 1063 (peak: 1076)
|
|
||||||
dracut-pre-pivot[519]: squashfs_readpage squashfs (0xffffffffc0022073) Pages: 1039 (peak: 1052)
|
|
||||||
dracut-pre-pivot[519]: squashfs_readpage_block squashfs (0xffffffffc0024334) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: squashfs_copy_cache squashfs (0xffffffffc0021a3f) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: pagecache_get_page (0xffffffff8124abf7) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: __page_cache_alloc (0xffffffff81247df6) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: alloc_pages_current (0xffffffff812cdca7) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: __alloc_pages_nodemask (0xffffffff812b3107) Pages: 744 (peak: 744)
|
|
||||||
dracut-pre-pivot[519]: __alloc_pages_nodemask (0xffffffff812b3107) Pages: 1488 (peak: 1488)
|
|
||||||
dracut-pre-pivot[519]: Top stack usage of module qxl:
|
|
||||||
dracut-pre-pivot[519]: (null) Pages: 865 (peak: 880)
|
|
||||||
dracut-pre-pivot[519]: entry_SYSCALL_64_after_hwframe (0xffffffff81a0008c) Pages: 855 (peak: 858)
|
|
||||||
dracut-pre-pivot[519]: do_syscall_64 (0xffffffff81002a5a) Pages: 855 (peak: 858)
|
|
||||||
dracut-pre-pivot[519]: __x64_sys_finit_module (0xffffffff8117ccea) Pages: 811 (peak: 811)
|
|
||||||
dracut-pre-pivot[519]: __do_sys_finit_module (0xffffffff8117cc6e) Pages: 811 (peak: 811)
|
|
||||||
dracut-pre-pivot[519]: load_module (0xffffffff8117c6be) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: do_init_module (0xffffffff81179e72) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: do_one_initcall (0xffffffff81000d5a) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: serio_raw_poll serio_raw (0xffffffffc0200054) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: __pci_register_driver (0xffffffff81557804) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: driver_register (0xffffffff8167ed24) Pages: 802 (peak: 802)
|
|
||||||
dracut-pre-pivot[519]: bus_add_driver (0xffffffff8167cbb2) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: driver_attach (0xffffffff8167d28e) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: bus_for_each_dev (0xffffffff8167b62c) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: __driver_attach (0xffffffff8167e18f) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: device_driver_attach (0xffffffff8167e0ed) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: driver_probe_device (0xffffffff8167de6c) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: really_probe (0xffffffff8167d9c9) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: pci_device_probe (0xffffffff81559627) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: local_pci_probe (0xffffffff81557f98) Pages: 801 (peak: 801)
|
|
||||||
dracut-pre-pivot[519]: qxl_pci_probe qxl (0xffffffffc01f0387) Pages: 773 (peak: 773)
|
|
||||||
dracut-pre-pivot[519]: drm_fbdev_generic_setup drm_kms_helper (0xffffffffc01b30c5) Pages: 773 (peak: 773)
|
|
||||||
dracut-pre-pivot[519]: drm_fbdev_client_hotplug drm_kms_helper (0xffffffffc01b2656) Pages: 773 (peak: 773)
|
|
||||||
dracut-pre-pivot[519]: __drm_fb_helper_initial_config_and_unlock drm_kms_helper (0xffffffffc01b1a28) Pages: 770 (peak: 770)
|
|
||||||
dracut-pre-pivot[519]: drm_fb_helper_generic_probe drm_kms_helper (0xffffffffc01b2fa5) Pages: 770 (peak: 770)
|
|
||||||
dracut-pre-pivot[519]: vzalloc (0xffffffff812aa39c) Pages: 770 (peak: 770)
|
|
||||||
dracut-pre-pivot[519]: __vmalloc_node_range (0xffffffff812aa200) Pages: 768 (peak: 768)
|
|
||||||
... snip ...
|
|
||||||
======== Report format module_top END ========
|
|
||||||
|
|
||||||
This could be very helpful for debuging memory usage issues.
|
|
||||||
|
|
||||||
(cherry picked from commit 7dd8a2f4d351ce8975c0af122732a2a12697c8cc)
|
|
||||||
|
|
||||||
Resolves: #1829528
|
|
||||||
---
|
|
||||||
dracut.cmdline.7.asc | 16 +++++---
|
|
||||||
dracut.spec | 2 +
|
|
||||||
modules.d/99base/dracut-lib.sh | 2 +-
|
|
||||||
modules.d/99memstrack/memstrack-report.sh | 23 +++++++++++
|
|
||||||
modules.d/99memstrack/memstrack-start.sh | 68 +++++++++++++++++++++++++++++++
|
|
||||||
modules.d/99memstrack/memstrack.service | 13 ++++++
|
|
||||||
modules.d/99memstrack/module-setup.sh | 27 ++++++++++++
|
|
||||||
7 files changed, 144 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
|
||||||
index 0dc58d1a..7f31fbae 100644
|
|
||||||
--- a/dracut.cmdline.7.asc
|
|
||||||
+++ b/dracut.cmdline.7.asc
|
|
||||||
@@ -187,8 +187,8 @@ It should be attached to any report about dracut problems.
|
|
||||||
_/run/initramfs/init.log_.
|
|
||||||
If "quiet" is set, it also logs to the console.
|
|
||||||
|
|
||||||
-**rd.memdebug=[0-3]**::
|
|
||||||
- Print memory usage info at various points, set the verbose level from 0 to 4.
|
|
||||||
+**rd.memdebug=[0-5]**::
|
|
||||||
+ Print memory usage info at various points, set the verbose level from 0 to 5.
|
|
||||||
+
|
|
||||||
Higher level means more debugging output:
|
|
||||||
+
|
|
||||||
@@ -197,10 +197,14 @@ It should be attached to any report about dracut problems.
|
|
||||||
1 - partial /proc/meminfo
|
|
||||||
2 - /proc/meminfo
|
|
||||||
3 - /proc/meminfo + /proc/slabinfo
|
|
||||||
- 4 - /proc/meminfo + /proc/slabinfo + tracekomem
|
|
||||||
- NOTE: tracekomem is a shell script utilizing kernel trace to track
|
|
||||||
- the rough total memory consumption of kernel modules during
|
|
||||||
- loading. It may override other trace configurations.
|
|
||||||
+ 4 - /proc/meminfo + /proc/slabinfo + memstrack summary
|
|
||||||
+ NOTE: memstrack is a memory tracing tool that tracks the total memory
|
|
||||||
+ consumption, and peak memory consumption of each kernel modules
|
|
||||||
+ and userspace progress during the whole initramfs runtime, report
|
|
||||||
+ is genereted and the end of initramsfs run.
|
|
||||||
+ 5 - /proc/meminfo + /proc/slabinfo + memstrack (with top memory stacktrace)
|
|
||||||
+ NOTE: memstrack (with top memory stacktrace) will print top memory
|
|
||||||
+ allocation stack traces during the whole initramfs runtime.
|
|
||||||
----
|
|
||||||
|
|
||||||
**rd.break**::
|
|
||||||
diff --git a/dracut.spec b/dracut.spec
|
|
||||||
index 0f7eb4bf..c82c24f6 100644
|
|
||||||
--- a/dracut.spec
|
|
||||||
+++ b/dracut.spec
|
|
||||||
@@ -84,6 +84,7 @@ Requires: xz
|
|
||||||
Requires: gzip
|
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
|
||||||
+Recommends: memstrack
|
|
||||||
Recommends: hardlink
|
|
||||||
Recommends: pigz
|
|
||||||
Recommends: kpartx
|
|
||||||
@@ -399,6 +400,7 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne
|
|
||||||
%{dracutlibdir}/modules.d/98syslog
|
|
||||||
%{dracutlibdir}/modules.d/98usrmount
|
|
||||||
%{dracutlibdir}/modules.d/99base
|
|
||||||
+%{dracutlibdir}/modules.d/99memstrack
|
|
||||||
%{dracutlibdir}/modules.d/99fs-lib
|
|
||||||
%{dracutlibdir}/modules.d/99shutdown
|
|
||||||
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
|
|
||||||
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
||||||
index 502c7568..56dd63ef 100755
|
|
||||||
--- a/modules.d/99base/dracut-lib.sh
|
|
||||||
+++ b/modules.d/99base/dracut-lib.sh
|
|
||||||
@@ -1220,7 +1220,7 @@ are_lists_eq() {
|
|
||||||
|
|
||||||
setmemdebug() {
|
|
||||||
if [ -z "$DEBUG_MEM_LEVEL" ]; then
|
|
||||||
- export DEBUG_MEM_LEVEL=$(getargnum 0 0 3 rd.memdebug)
|
|
||||||
+ export DEBUG_MEM_LEVEL=$(getargnum 0 0 5 rd.memdebug)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/modules.d/99memstrack/memstrack-report.sh b/modules.d/99memstrack/memstrack-report.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..241e8621
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/99memstrack/memstrack-report.sh
|
|
||||||
@@ -0,0 +1,23 @@
|
|
||||||
+#!/usr/bin/env bash
|
|
||||||
+. /lib/dracut-lib.sh
|
|
||||||
+
|
|
||||||
+if ! [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then
|
|
||||||
+ exit 0
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+if type -P systemctl >/dev/null; then
|
|
||||||
+ systemctl stop memstrack.service
|
|
||||||
+else
|
|
||||||
+ get_pid_of_tracer () {
|
|
||||||
+ local _user _pid _rest
|
|
||||||
+ read _user _pid _rest <<< $(ps aux | grep [m]emstrack | head -1)
|
|
||||||
+ echo $_pid
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ kill -s INT $(get_pid_of_tracer)
|
|
||||||
+ while [[ -n $(get_pid_of_tracer) ]]; do
|
|
||||||
+ sleep 1
|
|
||||||
+ done
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+cat /.memstrack
|
|
||||||
diff --git a/modules.d/99memstrack/memstrack-start.sh b/modules.d/99memstrack/memstrack-start.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..5aa73efe
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/99memstrack/memstrack-start.sh
|
|
||||||
@@ -0,0 +1,68 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+# Mount kernel debug fs so debug tools can work.
|
|
||||||
+# memdebug=4 and memdebug=5 requires debug fs to be mounted.
|
|
||||||
+# And there is no need to umount it.
|
|
||||||
+
|
|
||||||
+type getargnum >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
||||||
+
|
|
||||||
+# "sys/kernel/tracing" has the priority if exists.
|
|
||||||
+get_trace_base() {
|
|
||||||
+ # trace access through debugfs would be obsolete if "/sys/kernel/tracing" is available.
|
|
||||||
+ if [ -d "/sys/kernel/tracing" ]; then
|
|
||||||
+ echo "/sys/kernel"
|
|
||||||
+ else
|
|
||||||
+ echo "/sys/kernel/debug"
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+is_debugfs_ready() {
|
|
||||||
+ [ -f "$(get_trace_base)/tracing/trace" ]
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+prepare_debugfs() {
|
|
||||||
+ local trace_base
|
|
||||||
+
|
|
||||||
+ trace_base=$(get_trace_base)
|
|
||||||
+ # old debugfs interface case.
|
|
||||||
+ if ! [ -d "$trace_base/tracing" ]; then
|
|
||||||
+ mount none -t debugfs $trace_base
|
|
||||||
+ # new tracefs interface case.
|
|
||||||
+ elif ! [ -f "$trace_base/tracing/trace" ]; then
|
|
||||||
+ mount none -t tracefs "$trace_base/tracing"
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ if ! [ -f "$trace_base/tracing/trace" ]; then
|
|
||||||
+ echo "WARN: failed to mount debugfs"
|
|
||||||
+ return 1
|
|
||||||
+ fi
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+if ! is_debugfs_ready ; then
|
|
||||||
+ prepare_debugfs
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+if [ -n "$DEBUG_MEM_LEVEL" ]; then
|
|
||||||
+ if [ "$DEBUG_MEM_LEVEL" -ge 5 ]; then
|
|
||||||
+ echo "memstrack - will report kernel module memory usage summary and top allocation stack"
|
|
||||||
+ memstrack --report module_summary,module_top --notui --throttle 80 -o /.memstrack &
|
|
||||||
+ elif [ "$DEBUG_MEM_LEVEL" -ge 4 ]; then
|
|
||||||
+ echo "memstrack - will report memory usage summary"
|
|
||||||
+ memstrack --report module_summary --notui --throttle 80 -o /.memstrack &
|
|
||||||
+ else
|
|
||||||
+ exit 0;
|
|
||||||
+ fi
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+PID=$!
|
|
||||||
+RET=$?
|
|
||||||
+
|
|
||||||
+if [ $RET -ne 0 ]; then
|
|
||||||
+ echo "Failed to start memstrack, exit status: $RET"
|
|
||||||
+ exit $RET
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+# Wait a second for memstrack to setup everything, avoid missing any event
|
|
||||||
+sleep 1
|
|
||||||
+
|
|
||||||
+echo $PID > /run/memstrack.pid
|
|
||||||
+disown
|
|
||||||
diff --git a/modules.d/99memstrack/memstrack.service b/modules.d/99memstrack/memstrack.service
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..6b47adef
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/99memstrack/memstrack.service
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+[Unit]
|
|
||||||
+Description=Memstrack Anylazing Service
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+Before=dracut-cmdline.service systemd-udevd.service local-fs-pre.target
|
|
||||||
+IgnoreOnIsolate=true
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=simple
|
|
||||||
+ExecStart=/bin/memstrack-start
|
|
||||||
+PIDFile=/run/memstrack.pid
|
|
||||||
+StandardInput=null
|
|
||||||
+StandardOutput=syslog+console
|
|
||||||
+StandardError=syslog+console
|
|
||||||
diff --git a/modules.d/99memstrack/module-setup.sh b/modules.d/99memstrack/module-setup.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..d5bacb4d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/modules.d/99memstrack/module-setup.sh
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+#!/usr/bin/bash
|
|
||||||
+
|
|
||||||
+check() {
|
|
||||||
+ if type -P memstrack >/dev/null; then
|
|
||||||
+ dinfo "memstrack is available"
|
|
||||||
+ return 0
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
+ dinfo "memstrack is not available"
|
|
||||||
+ dinfo "If you need to use rd.memdebug>=4, please install memstrack"
|
|
||||||
+
|
|
||||||
+ return 1
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+depends() {
|
|
||||||
+ return 0
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+install() {
|
|
||||||
+ inst "/bin/memstrack" "/bin/memstrack"
|
|
||||||
+
|
|
||||||
+ inst "$moddir/memstrack-start.sh" "/bin/memstrack-start"
|
|
||||||
+ inst_hook cleanup 99 "$moddir/memstrack-report.sh"
|
|
||||||
+
|
|
||||||
+ inst "$moddir/memstrack.service" "$systemdsystemunitdir/memstrack.service"
|
|
||||||
+ systemctl -q --root "$initdir" add-wants initrd.target memstrack.service
|
|
||||||
+}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 8b3033c92a073f9e63074ffcdb1af6e69d99105c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Attila Bruncsak <bruncsak@users.noreply.github.com>
|
|
||||||
Date: Fri, 14 Dec 2018 15:57:33 +0100
|
|
||||||
Subject: [PATCH] the strip command should avoid changing the file modification
|
|
||||||
time
|
|
||||||
|
|
||||||
(cherry picked from commit 7e944c77c0e05f2cc28e11227b465525c5131772)
|
|
||||||
|
|
||||||
Resolves: #1776659
|
|
||||||
---
|
|
||||||
dracut.sh | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index f270af76..223261d6 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1663,14 +1663,14 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
|
||||||
dinfo "*** Stripping files ***"
|
|
||||||
find "$initdir" -type f \
|
|
||||||
-executable -not -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
- | xargs -r -0 $strip_cmd -g 2>/dev/null
|
|
||||||
+ | xargs -r -0 $strip_cmd -g -p 2>/dev/null
|
|
||||||
|
|
||||||
# strip kernel modules, but do not touch signed modules
|
|
||||||
find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
| while read -r -d $'\0' f || [ -n "$f" ]; do
|
|
||||||
SIG=$(tail -c 28 "$f" | tr -d '\000')
|
|
||||||
[[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
|
|
||||||
- done | xargs -r -0 $strip_cmd -g
|
|
||||||
+ done | xargs -r -0 $strip_cmd -g -p
|
|
||||||
|
|
||||||
dinfo "*** Stripping files done ***"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
|||||||
From cbebaacfd05c55fddd11b3090983a2be1d2b48d3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 17 Jul 2019 17:10:36 +0800
|
|
||||||
Subject: [PATCH] dracut.sh: Adjust squash and strip order
|
|
||||||
|
|
||||||
Previously with squash module, some binaries will be reinstalled, but
|
|
||||||
stripping happens before that so new installed binaries is not stripped.
|
|
||||||
So adjust the squash and strip order, ensure new installed binaries are
|
|
||||||
stripped just the same way with the old binaries.
|
|
||||||
|
|
||||||
Also split squash into two stage to make the split easier, move the
|
|
||||||
squash temp dir into initdir so stripping will cover that too,
|
|
||||||
and print more usefule message.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 6a74c03b4a8472fb090015b32e652edfeadb5a10)
|
|
||||||
|
|
||||||
Resolves: #1776659
|
|
||||||
---
|
|
||||||
dracut.sh | 43 +++++++++++++++++++++++++------------------
|
|
||||||
1 file changed, 25 insertions(+), 18 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index 223261d6..310646e3 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1659,21 +1659,6 @@ for d in $(ldconfig_paths); do
|
|
||||||
rmdir -p --ignore-fail-on-non-empty "$initdir/$d" >/dev/null 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
-if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
|
||||||
- dinfo "*** Stripping files ***"
|
|
||||||
- find "$initdir" -type f \
|
|
||||||
- -executable -not -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
- | xargs -r -0 $strip_cmd -g -p 2>/dev/null
|
|
||||||
-
|
|
||||||
- # strip kernel modules, but do not touch signed modules
|
|
||||||
- find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
- | while read -r -d $'\0' f || [ -n "$f" ]; do
|
|
||||||
- SIG=$(tail -c 28 "$f" | tr -d '\000')
|
|
||||||
- [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
|
|
||||||
- done | xargs -r -0 $strip_cmd -g -p
|
|
||||||
-
|
|
||||||
- dinfo "*** Stripping files done ***"
|
|
||||||
-fi
|
|
||||||
if [[ $early_microcode = yes ]]; then
|
|
||||||
dinfo "*** Generating early-microcode cpio image ***"
|
|
||||||
ucode_dir=(amd-ucode intel-ucode)
|
|
||||||
@@ -1745,9 +1730,8 @@ if [[ $hostonly_cmdline == "yes" ]] ; then
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
-dinfo "*** Creating image file '$outfile' ***"
|
|
||||||
-
|
|
||||||
if dracut_module_included "squash"; then
|
|
||||||
+ dinfo "*** Install squash loader ***"
|
|
||||||
if ! check_kernel_config CONFIG_SQUASHFS; then
|
|
||||||
dfatal "CONFIG_SQUASHFS have to be enabled for dracut squash module to work"
|
|
||||||
exit 1
|
|
||||||
@@ -1761,7 +1745,7 @@ if dracut_module_included "squash"; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- readonly squash_dir="${DRACUT_TMPDIR}/squashfs"
|
|
||||||
+ readonly squash_dir="$initdir/squash/root"
|
|
||||||
readonly squash_img=$initdir/squash/root.img
|
|
||||||
|
|
||||||
# Currently only move "usr" "etc" to squashdir
|
|
||||||
@@ -1854,15 +1838,38 @@ if dracut_module_included "squash"; then
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
+fi
|
|
||||||
|
|
||||||
+if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
|
|
||||||
+ dinfo "*** Stripping files ***"
|
|
||||||
+ find "$initdir" -type f \
|
|
||||||
+ -executable -not -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
+ | xargs -r -0 $strip_cmd -g -p 2>/dev/null
|
|
||||||
+
|
|
||||||
+ # strip kernel modules, but do not touch signed modules
|
|
||||||
+ find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
|
|
||||||
+ | while read -r -d $'\0' f || [ -n "$f" ]; do
|
|
||||||
+ SIG=$(tail -c 28 "$f" | tr -d '\000')
|
|
||||||
+ [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
|
|
||||||
+ done | xargs -r -0 $strip_cmd -g -p
|
|
||||||
+ dinfo "*** Stripping files done ***"
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+if dracut_module_included "squash"; then
|
|
||||||
+ dinfo "*** Squashing the files inside the initramfs ***"
|
|
||||||
mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
dfatal "dracut: Failed making squash image"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
+
|
|
||||||
+ rm -rf $squash_dir
|
|
||||||
+ dinfo "*** Squashing the files inside the initramfs done ***"
|
|
||||||
fi
|
|
||||||
|
|
||||||
+dinfo "*** Creating image file '$outfile' ***"
|
|
||||||
+
|
|
||||||
if [[ $uefi = yes ]]; then
|
|
||||||
readonly uefi_outdir="$DRACUT_TMPDIR/uefi"
|
|
||||||
mkdir "$uefi_outdir"
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From b36c1ff083499c2cf1d1dbb7fe1663a2dd0683cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Wed, 25 Sep 2019 13:47:40 +0800
|
|
||||||
Subject: [PATCH] Fine tune mksquashfs options for squash module
|
|
||||||
|
|
||||||
Drop some unneeded metadata in the squash image, and print the error
|
|
||||||
message if something went wrong.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 89bc1aa324bcdda3723247218a697171c5a3de6f)
|
|
||||||
|
|
||||||
Resolves: #1776659
|
|
||||||
---
|
|
||||||
dracut.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/dracut.sh b/dracut.sh
|
|
||||||
index 310646e3..487add57 100755
|
|
||||||
--- a/dracut.sh
|
|
||||||
+++ b/dracut.sh
|
|
||||||
@@ -1857,7 +1857,7 @@ fi
|
|
||||||
|
|
||||||
if dracut_module_included "squash"; then
|
|
||||||
dinfo "*** Squashing the files inside the initramfs ***"
|
|
||||||
- mksquashfs $squash_dir $squash_img -comp xz -b 64K -Xdict-size 100% &> /dev/null
|
|
||||||
+ mksquashfs $squash_dir $squash_img -no-xattrs -no-exports -noappend -always-use-fragments -comp xz -Xdict-size 100% -no-progress 1> /dev/null
|
|
||||||
|
|
||||||
if [[ $? != 0 ]]; then
|
|
||||||
dfatal "dracut: Failed making squash image"
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
|||||||
From 90d96c4f6a44d895f8999da8c4721a04612e6379 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Tue, 29 Oct 2019 16:29:14 +0800
|
|
||||||
Subject: [PATCH] 90kernel-modules: don't install any block driver if not
|
|
||||||
needed
|
|
||||||
|
|
||||||
If hostonly mode is in use, and there isn't any block device included
|
|
||||||
as hostonly device, then the initramfs won't need any block driver.
|
|
||||||
|
|
||||||
Eg. for kdump built image, there could be only one nfs mount point,
|
|
||||||
or the initramfs may only execute some network operation then reboot.
|
|
||||||
|
|
||||||
In such case, skip block driver installation to save space and time.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit f4ad2e5c8964b6c7b50420299a0096bade6a40bd)
|
|
||||||
|
|
||||||
Resolves: #1776659
|
|
||||||
---
|
|
||||||
modules.d/90kernel-modules/module-setup.sh | 32 +++++++++++++++++++++++-------
|
|
||||||
1 file changed, 25 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
|
||||||
index 3dfceff0..c91ba10c 100755
|
|
||||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
|
||||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
|
||||||
@@ -2,6 +2,8 @@
|
|
||||||
|
|
||||||
# called by dracut
|
|
||||||
installkernel() {
|
|
||||||
+ local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma'
|
|
||||||
+
|
|
||||||
find_kernel_modules_external () {
|
|
||||||
local _OLDIFS
|
|
||||||
local external_pattern="^/"
|
|
||||||
@@ -16,11 +18,25 @@ installkernel() {
|
|
||||||
done < "$srcmods/modules.dep"
|
|
||||||
IFS=$_OLDIFS
|
|
||||||
}
|
|
||||||
- local _blockfuncs='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_add_host|scsi_add_host_with_dma'
|
|
||||||
+
|
|
||||||
+ is_block_dev() {
|
|
||||||
+ [ -e /sys/dev/block/$1 ] && return 0
|
|
||||||
+ return 1
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ install_block_modules () {
|
|
||||||
+ hostonly='' instmods sr_mod sd_mod scsi_dh ata_piix
|
|
||||||
+ instmods \
|
|
||||||
+ scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
|
||||||
+ =ide nvme vmd nfit \
|
|
||||||
+ virtio_blk
|
|
||||||
+
|
|
||||||
+ dracut_instmods -o -s "${_blockfuncs}" "=drivers"
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if [[ -z $drivers ]]; then
|
|
||||||
hostonly='' instmods \
|
|
||||||
- sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
|
|
||||||
+ hid_generic unix \
|
|
||||||
ehci-hcd ehci-pci ehci-platform \
|
|
||||||
ohci-hcd ohci-pci \
|
|
||||||
uhci-hcd \
|
|
||||||
@@ -38,10 +54,10 @@ installkernel() {
|
|
||||||
${NULL}
|
|
||||||
|
|
||||||
instmods \
|
|
||||||
- yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
|
|
||||||
+ yenta_socket \
|
|
||||||
atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
|
|
||||||
- virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
|
|
||||||
- "=drivers/pcmcia" =ide nvme vmd nfit
|
|
||||||
+ virtio virtio_ring virtio_pci virtio_scsi \
|
|
||||||
+ "=drivers/pcmcia"
|
|
||||||
|
|
||||||
if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then
|
|
||||||
# arm/aarch64 specific modules
|
|
||||||
@@ -72,10 +88,12 @@ installkernel() {
|
|
||||||
${NULL}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- dracut_instmods -o -s "${_blockfuncs}" "=drivers"
|
|
||||||
-
|
|
||||||
find_kernel_modules_external | instmods
|
|
||||||
|
|
||||||
+ if ! [[ $hostonly ]] || for_each_host_dev_and_slaves is_block_dev; then
|
|
||||||
+ install_block_modules
|
|
||||||
+ fi
|
|
||||||
+
|
|
||||||
# if not on hostonly mode, install all known filesystems,
|
|
||||||
# if the required list is not set via the filesystems variable
|
|
||||||
if ! [[ $hostonly ]]; then
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From 9eb855e073c077966a011146484b9b9596857361 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kairui Song <kasong@redhat.com>
|
|
||||||
Date: Thu, 5 Mar 2020 18:44:45 +0800
|
|
||||||
Subject: [PATCH] 95znet: Add a rd.znet_ifname= option
|
|
||||||
|
|
||||||
qeth device may have a different IP for each boot, so the rd.ifname=
|
|
||||||
option will no longer work. So for znet device, introduce a
|
|
||||||
rd.znet_ifname= options, to subchannel id instead of MAC address as the
|
|
||||||
identifier and rename the interface.
|
|
||||||
|
|
||||||
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
||||||
(cherry picked from commit 872eb69936bd849eec6d1974dd6569f23a7ad3db)
|
|
||||||
|
|
||||||
Resolves: #1811977
|
|
||||||
---
|
|
||||||
dracut.cmdline.7.asc | 5 +++++
|
|
||||||
modules.d/95znet/parse-ccw.sh | 18 ++++++++++++++++++
|
|
||||||
2 files changed, 23 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
|
||||||
index 7f31fbae..4a7c2517 100644
|
|
||||||
--- a/dracut.cmdline.7.asc
|
|
||||||
+++ b/dracut.cmdline.7.asc
|
|
||||||
@@ -829,6 +829,11 @@ ZNET
|
|
||||||
RHEL/Fedora with ccw_init, which is called from udev for certain
|
|
||||||
devices on z-series.
|
|
||||||
rd.znet can be specified multiple times on the kernel command line.
|
|
||||||
+
|
|
||||||
+**rd.znet_ifname=**__<ifname>__:__<subchannels>__::
|
|
||||||
+ Assign network device name <interface> (i.e. "bootnet") to the NIC
|
|
||||||
+ corresponds to the subchannels. This is useful when dracut's default
|
|
||||||
+ "ifname=" doesn't work due to device having a changing MAC address.
|
|
||||||
+
|
|
||||||
[listing]
|
|
||||||
.Example
|
|
||||||
diff --git a/modules.d/95znet/parse-ccw.sh b/modules.d/95znet/parse-ccw.sh
|
|
||||||
index 7d40a1aa..59b588f3 100755
|
|
||||||
--- a/modules.d/95znet/parse-ccw.sh
|
|
||||||
+++ b/modules.d/95znet/parse-ccw.sh
|
|
||||||
@@ -4,4 +4,22 @@ for ccw_arg in $(getargs rd.ccw -d 'rd_CCW=') $(getargs rd.znet -d 'rd_ZNET=');
|
|
||||||
echo $ccw_arg >> /etc/ccw.conf
|
|
||||||
done
|
|
||||||
|
|
||||||
+for ifname in $(getargs rd.znet_ifname); do
|
|
||||||
+ IFS=: read ifname_if ifname_subchannels _rest <<< "$ifname"
|
|
||||||
+ if [ -z "$ifname_if" ] || [ -z "$ifname_subchannels" ] || [ -n "$_rest" ]; then
|
|
||||||
+ warn "Invalid arguments for rd.znet_ifname="
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ ifname_subchannels=${ifname_subchannels//,/|}
|
|
||||||
+
|
|
||||||
+ echo 'ACTION!="add|change", GOTO="ccw_ifname_end"'
|
|
||||||
+ echo 'ATTR{type}!="1", GOTO="ccw_ifname_end"'
|
|
||||||
+ echo 'SUBSYSTEM!="net", GOTO="ccw_ifname_end"'
|
|
||||||
+ echo "SUBSYSTEMS==\"ccwgroup\", KERNELS==\"$ifname_subchannels\", DRIVERS==\"?*\" NAME=\"$ifname_if\""
|
|
||||||
+ echo 'LABEL="ccw_ifname_end"'
|
|
||||||
+
|
|
||||||
+ } > /etc/udev/rules.d/81-ccw-ifname.rules
|
|
||||||
+ fi
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
znet_cio_free
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 4f43dd89a1f9c21f66d6b460c0ad1b271ee40492 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
||||||
Date: Mon, 25 May 2020 11:59:31 +0200
|
|
||||||
Subject: [PATCH] Revert "[RHEL] network: default to network-legacy even in
|
|
||||||
presence of nm-initrd-generator"
|
|
||||||
|
|
||||||
This reverts commit 7843bc52777683f6a4ef953d8dde7171ff3b911c.
|
|
||||||
|
|
||||||
This will cause that NM will be used in initrd on systems where it is installed.
|
|
||||||
|
|
||||||
Resolves: #1839706
|
|
||||||
---
|
|
||||||
modules.d/40network/module-setup.sh | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh
|
|
||||||
index bf252eb7..8e2a74a3 100755
|
|
||||||
--- a/modules.d/40network/module-setup.sh
|
|
||||||
+++ b/modules.d/40network/module-setup.sh
|
|
||||||
@@ -8,9 +8,9 @@ check() {
|
|
||||||
# called by dracut
|
|
||||||
depends() {
|
|
||||||
echo -n "kernel-network-modules "
|
|
||||||
- # RHEL 8.1: Default to network-legacy unless the user chose
|
|
||||||
- # network-manager manually
|
|
||||||
- if ! dracut_module_included "network-manager" ; then
|
|
||||||
+ if ! dracut_module_included "network-legacy" && [ -x "/usr/libexec/nm-initrd-generator" ] ; then
|
|
||||||
+ echo "network-manager"
|
|
||||||
+ else
|
|
||||||
echo "network-legacy"
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user