Skip to content

Commit a2b6be4

Browse files
ryncsnjohannbg
authored andcommitted
fix(squash): create relative symlinks
Don't use absolute path, or it may resolve to wrong files after unpack the initramfs to a sub path on a running system. Signed-off-by: Kairui Song <[email protected]>
1 parent 78557f0 commit a2b6be4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules.d/99squash/module-setup.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ installpost() {
5353
dracut_kernel_post
5454

5555
# Install squash image init script.
56-
ln -sfn /usr/bin "$initdir/bin"
57-
ln -sfn /usr/sbin "$initdir/sbin"
56+
ln_r /usr/bin /bin
57+
ln_r /usr/sbin /sbin
5858
inst_simple "$moddir"/init-squash.sh /init
5959
}
6060

0 commit comments

Comments
 (0)