Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137326440
D28209.id82501.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
794 B
Referenced Files
None
Subscribers
None
D28209.id82501.diff
View Options
diff --git a/libexec/rc/rc.d/tmp b/libexec/rc/rc.d/tmp
--- a/libexec/rc/rc.d/tmp
+++ b/libexec/rc/rc.d/tmp
@@ -40,10 +40,16 @@
mount_tmpmfs()
{
- if ! /bin/df /tmp | grep -q "^/dev/md[0-9].* /tmp"; then
- mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
- chmod 01777 /tmp
- fi
+ while read line; do
+ case $line in
+ /dev/md[0-9]*\ /tmp)
+ return;;
+ esac
+ done <<*EOF
+$(df /tmp)
+*EOF
+ mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
+ chmod 01777 /tmp
}
# If we do not have a writable /tmp, create a memory
@@ -52,7 +58,8 @@
#
case "${tmpmfs}" in
[Aa][Uu][Tt][Oo])
- if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
+ _tmpdir=/tmp/.diskless.$(dd if=/dev/random bs=32 count=1 2>/dev/null | sha256)
+ if mkdir $_tmpdir; then
rmdir ${_tmpdir}
else
if [ -h /tmp ]; then
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 23, 12:19 PM (13 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26013603
Default Alt Text
D28209.id82501.diff (794 B)
Attached To
Mode
D28209: Remove dependency of rc.d/tmp on grep
Attached
Detach File
Event Timeline
Log In to Comment