|
|
ab92d3 |
From 487d2686a78cfa52419b330fa2b62af715c4356b Mon Sep 17 00:00:00 2001
|
|
|
ab92d3 |
From: Kairui Song <kasong@redhat.com>
|
|
|
ab92d3 |
Date: Thu, 10 Jun 2021 16:45:03 +0800
|
|
|
ab92d3 |
Subject: [PATCH] fix(squash): create relative symlinks
|
|
|
ab92d3 |
|
|
|
ab92d3 |
Don't use absolute path, or it may resolve to wrong files after unpack
|
|
|
ab92d3 |
the initramfs to a sub path on a running system.
|
|
|
ab92d3 |
|
|
|
ab92d3 |
Signed-off-by: Kairui Song <kasong@redhat.com>
|
|
|
ab92d3 |
(cherry picked from commit a2b6be44792b68218e3378a7d844b0f8527a4805)
|
|
|
ab92d3 |
|
|
|
ab92d3 |
Resolves: #1959336
|
|
|
ab92d3 |
---
|
|
|
ab92d3 |
modules.d/99squash/module-setup.sh | 4 ++--
|
|
|
ab92d3 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ab92d3 |
|
|
|
ab92d3 |
diff --git a/modules.d/99squash/module-setup.sh b/modules.d/99squash/module-setup.sh
|
|
|
ab92d3 |
index 9bb30b2e..8c9982c0 100644
|
|
|
ab92d3 |
--- a/modules.d/99squash/module-setup.sh
|
|
|
ab92d3 |
+++ b/modules.d/99squash/module-setup.sh
|
|
|
ab92d3 |
@@ -53,8 +53,8 @@ installpost() {
|
|
|
ab92d3 |
dracut_kernel_post
|
|
|
ab92d3 |
|
|
|
ab92d3 |
# Install squash image init script.
|
|
|
ab92d3 |
- ln -sfn /usr/bin "$initdir/bin"
|
|
|
ab92d3 |
- ln -sfn /usr/sbin "$initdir/sbin"
|
|
|
ab92d3 |
+ ln_r /usr/bin /bin
|
|
|
ab92d3 |
+ ln_r /usr/sbin /sbin
|
|
|
ab92d3 |
inst_simple "$moddir"/init-squash.sh /init
|
|
|
ab92d3 |
}
|
|
|
ab92d3 |
|
|
|
ab92d3 |
|