From 0808f2861979f4b97ea8f80d9427f34bf2f2224f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 12 Jul 2024 13:39:23 +0800 Subject: [PATCH] bootscripts: Add -n to the ln command, for recreating /dev/fd correctly if the initramfs has already created one --- bootscripts/ChangeLog | 4 ++++ bootscripts/lfs/init.d/mountvirtfs | 2 +- packages.ent | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 129fbd454..558230238 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,7 @@ +2024-07-12 Xi Ruoyao + * In mountvirtfs, recreate /dev/fd correctly if it's already created + by the initramfs. + 2024-07-06 Bruce Dubbs * Add logic to init-functions to only print escape sequences if stdin and stdout are connected to a terminal. diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index fd797787a..de6b2de62 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -83,7 +83,7 @@ case "${1}" in ln -sf /proc/self/fd/2 /dev/stderr || failed=1 log_info_msg2 " ${INFO}/dev/fd" - ln -sf /proc/self/fd /dev/fd || failed=1 + ln -sfn /proc/self/fd /dev/fd || failed=1 if [ -e /proc/kcore ]; then log_info_msg2 " ${INFO}/dev/core" diff --git a/packages.ent b/packages.ent index bc117fc85..7220b22e4 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - +