Page MenuHomeFreeBSD

D26217.id.diff
No OneTemporary

D26217.id.diff

Index: stable/12/libexec/rc/rc.d/linux
===================================================================
--- stable/12/libexec/rc/rc.d/linux
+++ stable/12/libexec/rc/rc.d/linux
@@ -15,6 +15,12 @@
start_cmd="${name}_start"
stop_cmd=":"
+unmounted()
+{
+ [ `stat -f "%d" "$1"` == `stat -f "%d" "$1/.."` -a \
+ `stat -f "%i" "$1"` != `stat -f "%i" "$1/.."` ]
+}
+
linux_start()
{
local _emul_path _tmpdir
@@ -48,11 +54,12 @@
if checkyesno linux_mounts_enable; then
_emul_path="/compat/linux"
- mount -t linprocfs linprocfs "${_emul_path}/proc"
- mount -t linsysfs linsysfs "${_emul_path}/sys"
- mount -t devfs devfs "${_emul_path}/dev"
- mount -o linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd"
- mount -o mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm"
+ unmounted "${_emul_path}/proc" && mount -t linprocfs linprocfs "${_emul_path}/proc"
+ unmounted "${_emul_path}/sys" && mount -t linsysfs linsysfs "${_emul_path}/sys"
+ unmounted "${_emul_path}/dev" && mount -t devfs devfs "${_emul_path}/dev"
+ unmounted "${_emul_path}/dev/fd" && mount -o linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd"
+ unmounted "${_emul_path}/dev/shm" && mount -o mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm"
+ true
fi
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jul 24, 12:41 AM (20 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35398240
Default Alt Text
D26217.id.diff (1 KB)

Event Timeline