a3b408b277
- enable dracut-cpio binary - feat(fips-crypto-policies): make c-p follow FIPS mode automatically - fix(fips-crypto-policies): make it depend on fips dracut module Resolves: RHEL-59678,RHEL-65204 From-source-git-commit: ff3186be9d5871c6ec216019463199bb78cc1b32
56 lines
1.9 KiB
Diff
56 lines
1.9 KiB
Diff
From c0bd2334708d9bfc6fbeb1c63eae0037eb4157b6 Mon Sep 17 00:00:00 2001
|
|
From: Philipp Rudo <prudo@redhat.com>
|
|
Date: Tue, 30 Jul 2024 13:35:17 +0200
|
|
Subject: [PATCH 19/32] fix(squash): explicitly create required directories
|
|
|
|
At the moment 99squash relies on dracut-install to create the required
|
|
directories it later links to. This approach is error prone and will
|
|
cause problems when switching to use 99busybox later on, which tries to
|
|
add a link to /usr/sbin that hasn't been created. Thus explicitly
|
|
create the expected directories before installing the minimal initrd.
|
|
|
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
|
(cherry picked from commit dde95b10ff6b28330370fd697350f8bc5da422da)
|
|
|
|
Related: RHEL-43460
|
|
---
|
|
modules.d/99squash/module-setup.sh | 13 +++++++------
|
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
|
|
index 5cbbec63..6aa649b7 100755
|
|
--- a/modules.d/99squash/module-setup.sh
|
|
+++ b/modules.d/99squash/module-setup.sh
|
|
@@ -40,12 +40,15 @@ squash_get_handler() {
|
|
}
|
|
|
|
squash_install() {
|
|
- local _busybox
|
|
+ local _busybox _dir
|
|
_busybox=$(find_binary busybox)
|
|
|
|
- # Create mount points for squash loader
|
|
- mkdir -p "$initdir"/squash/
|
|
- mkdir -p "$squashdir"/squash/
|
|
+ # Create mount points for squash loader and basic directories
|
|
+ mkdir -p "$initdir"/squash
|
|
+ for _dir in squash usr/bin usr/sbin usr/lib; do
|
|
+ mkdir -p "$squashdir/$_dir"
|
|
+ [[ $_dir == usr/* ]] && ln_r "/$_dir" "${_dir#usr}"
|
|
+ done
|
|
|
|
# Install required modules and binaries for the squash image init script.
|
|
if [[ $_busybox ]]; then
|
|
@@ -67,8 +70,6 @@ squash_install() {
|
|
dracut_kernel_post
|
|
|
|
# Install squash image init script.
|
|
- ln_r /usr/bin /bin
|
|
- ln_r /usr/sbin /sbin
|
|
inst_simple "$moddir"/init-squash.sh /init
|
|
|
|
# make sure that library links are correct and up to date for squash loader
|
|
--
|
|
2.42.0
|
|
|