Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F95794537
D32463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32463.diff
View Options
diff --git a/libexec/rc/rc.d/linux b/libexec/rc/rc.d/linux
--- a/libexec/rc/rc.d/linux
+++ b/libexec/rc/rc.d/linux
@@ -15,6 +15,17 @@
start_cmd="${name}_start"
stop_cmd=":"
+linux_mount() {
+ local _fs _mount_point
+ _fs="$1"
+ _mount_point="$2"
+ shift 2
+ if ! mount | grep -q "^$_fs on $_mount_point ("; then
+ mkdir -p "$_mount_point"
+ mount "$@" -t "$_fs" "$_fs" "$_mount_point"
+ fi
+}
+
linux_start()
{
local _emul_path _tmpdir
@@ -61,12 +72,12 @@
sysctl kern.elf32.fallback_brand=3 > /dev/null
fi
- if checkyesno linux_mounts_enable; then
- 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"
- mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd"
- mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm"
+ if checkyesno linux_mounts_enable; then
+ linux_mount linprocfs "${_emul_path}/proc" -o nocover
+ linux_mount linsysfs "${_emul_path}/sys" -o nocover
+ linux_mount devfs "${_emul_path}/dev" -o nocover
+ linux_mount fdescfs "${_emul_path}/dev/fd" -o nocover,linrdlnk
+ linux_mount tmpfs "${_emul_path}/dev/shm" -o nocover,mode=1777
fi
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 23, 4:38 PM (22 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12557177
Default Alt Text
D32463.diff (1 KB)
Attached To
Mode
D32463: rc.d/linux: Attempt to mount only if necessary
Attached
Detach File
Event Timeline
Log In to Comment