Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144964611
D26240.id76379.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D26240.id76379.diff
View Options
Index: libexec/rc/rc.d/linux
===================================================================
--- libexec/rc/rc.d/linux
+++ libexec/rc/rc.d/linux
@@ -19,17 +19,18 @@
{
local _emul_path _tmpdir
+ _emul_path="/compat/linux"
load_kld -e 'linux(aout|elf)' linux
case `sysctl -n hw.machine_arch` in
amd64)
load_kld -e 'linux64elf' linux64
;;
esac
- if [ -x /compat/linux/sbin/ldconfigDisabled ]; then
+ if [ -x "${_emul_path}/sbin/ldconfigDisabled" ]; then
_tmpdir=`mktemp -d -t linux-ldconfig`
- /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
- if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then
- cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache
+ ${_emul_path}/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
+ if ! cmp -s ${_tmpdir}/ld.so.cache "${_emul_path}/etc/ld.so.cache"; then
+ cat ${_tmpdir}/ld.so.cache > "${_emul_path}/etc/ld.so.cache"
fi
rm -rf ${_tmpdir}
fi
@@ -46,8 +47,15 @@
sysctl kern.elf32.fallback_brand=3 > /dev/null
fi
+ if checkyesno linux_mounts_createdirs; then
+ install -d -m 0755 "${_emul_path}/proc" \
+ "${_emul_path}/sys" \
+ "${_emul_path}/dev" \
+ "${_emul_path}/dev/fd" \
+ "${_emul_path}/dev/shm"
+ fi
+
if checkyesno linux_mounts_enable; then
- _emul_path="/compat/linux"
mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc"
mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys"
mount -o nocover -t devfs devfs "${_emul_path}/dev"
Index: share/man/man4/linux.4
===================================================================
--- share/man/man4/linux.4
+++ share/man/man4/linux.4
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 5, 2020
+.Dd August 30, 2020
.Dt LINUX 4
.Os
.Sh NAME
@@ -88,6 +88,11 @@
line:
.Pp
.Dl linux_mounts_enable="NO"
+.Pp
+To create directories required for Linux-specific filesystems in case they does
+not already exist, also add the following line:
+.Pp
+.Dl linux_mounts_createdirs="YES"
.Sh SYSCTL VARIABLES
The following variables are available as both
.Xr sysctl 8
@@ -125,6 +130,7 @@
.Va SIGINFO
work for Linux executables.
Defaults to 0.
+.El
.Sh FILES
.Bl -tag -width /compat/linux/dev/shm -compact
.It Pa /compat/linux
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 15, 1:38 PM (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28743328
Default Alt Text
D26240.id76379.diff (2 KB)
Attached To
Mode
D26240: Allow rc.d/linux to create mount points for Linux-specific filestsystems
Attached
Detach File
Event Timeline
Log In to Comment