diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2022-09-20 12:20:58 -0500 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2022-09-20 12:20:58 -0500 |
commit | 16cd09633edb80d587548ce3cd2296b4b803f210 (patch) | |
tree | a6a1c8b087bde5baeee7ad1ff0157d46697cde7d /bootscripts | |
parent | cc8e57dc7ad8dd6acc35b050fbd2a92c352bb9e8 (diff) |
Adjust instructions for /dev/shm when creating virtual filesystems.
Some host create /dev/shm as a tmpfs. Some have is as
a symlink to a location in another directory. This
change handles both cases.
The change to the sysV bootscripts now creates /dev/shm
as a separate tmpfs from /run. This makes LFS sysV and
systemd versions treat /dev/shm the same.
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 3 | ||||
-rw-r--r-- | bootscripts/lfs/init.d/mountvirtfs | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index c1b590568..1fca16a65 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2022-09-30 Bruce Dubbs <bdubbs@linuxfromscratch.org> + * Mount /dev/shm as a tmpfs. + 2022-07-23 Thomas Trepl <thomas@linuxfromscratch.org> * Mark an raid array clean when root (/) has been remounted r/o when system goes down. Otherwise, array does remain diff --git a/bootscripts/lfs/init.d/mountvirtfs b/bootscripts/lfs/init.d/mountvirtfs index 639634377..21d98a05d 100644 --- a/bootscripts/lfs/init.d/mountvirtfs +++ b/bootscripts/lfs/init.d/mountvirtfs @@ -38,8 +38,8 @@ case "${1}" in mount /run || failed=1 fi - mkdir -p /run/lock /run/shm - chmod 1777 /run/shm /run/lock + mkdir -p /run/lock + chmod 1777 /run/lock log_info_msg "Mounting virtual file systems: ${INFO}/run" @@ -58,7 +58,9 @@ case "${1}" in mount -o mode=0755,nosuid /dev || failed=1 fi - ln -sfn /run/shm /dev/shm + mkdir -p /dev/shm + log_info_msg2 " ${INFO}/dev/shm" + mount -o nosuid,nodev /dev/shm || failed=1 (exit ${failed}) evaluate_retval |