mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
bootscripts: mountvirtfs: Create essential symlinks in /dev targeting /proc
These were handled by Eudev, but systemd-udevd stopped to creating them since 2020.
This commit is contained in:
parent
0d824c5280
commit
8435a70be4
@ -1,3 +1,7 @@
|
|||||||
|
2023-07-22 Xi Ruoyao <xry111@xry111.site>
|
||||||
|
* In mountvirtfs, create symlinks /dev/{fd,std{in,out,err}} and
|
||||||
|
/dev/core (optional).
|
||||||
|
|
||||||
2023-07-15 Xi Ruoyao <xry111@xry111.site>
|
2023-07-15 Xi Ruoyao <xry111@xry111.site>
|
||||||
* Use /bin/udevadm instead of /sbin/udevadm.
|
* Use /bin/udevadm instead of /sbin/udevadm.
|
||||||
|
|
||||||
|
@ -7,8 +7,9 @@
|
|||||||
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
||||||
# DJ Lucas - dj@linuxfromscratch.org
|
# DJ Lucas - dj@linuxfromscratch.org
|
||||||
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
|
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
|
||||||
|
# Xi Ruoyao - xry111@xry111.site
|
||||||
#
|
#
|
||||||
# Version : LFS 7.0
|
# Version : LFS 12.0
|
||||||
#
|
#
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
@ -62,6 +63,29 @@ case "${1}" in
|
|||||||
log_info_msg2 " ${INFO}/dev/shm"
|
log_info_msg2 " ${INFO}/dev/shm"
|
||||||
mount -o nosuid,nodev /dev/shm || failed=1
|
mount -o nosuid,nodev /dev/shm || failed=1
|
||||||
|
|
||||||
|
(exit ${failed})
|
||||||
|
evaluate_retval
|
||||||
|
if [ "${failed}" = 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log_info_msg "Create symlinks in /dev targeting /proc: ${INFO}/dev/stdin"
|
||||||
|
ln -sf /proc/self/fd/0 /dev/stdin || failed=1
|
||||||
|
|
||||||
|
log_info_msg2 " ${INFO}/dev/stdout"
|
||||||
|
ln -sf /proc/self/fd/1 /dev/stdout || failed=1
|
||||||
|
|
||||||
|
log_info_msg2 " ${INFO}/dev/stderr"
|
||||||
|
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
|
||||||
|
|
||||||
|
if [ -e /proc/kcore ]; then
|
||||||
|
log_info_msg2 " ${INFO}/dev/core"
|
||||||
|
ln -sf /proc/kcore /dev/core || failed=1
|
||||||
|
fi
|
||||||
|
|
||||||
(exit ${failed})
|
(exit ${failed})
|
||||||
evaluate_retval
|
evaluate_retval
|
||||||
exit $failed
|
exit $failed
|
||||||
|
Loading…
Reference in New Issue
Block a user