mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 12:48:33 -10:00
rc.d/tmp: Fix dupe mount check
Before mounting a new mfs on /tmp, we check if there already is one. However, the dupe check only takes /dev/md[0-9]* into account, while the default mfs type these days is tmpfs. Rewrite it to look for tmpfs as well. Note that the dupe check is redundant in the tmpmfs=auto case, but we leave moving it for later. PR: 182035 MFC after: 1 week Reviewed by: kevans, allanjude Differential Revision: https://reviews.freebsd.org/D57682
This commit is contained in:
1 parent
b0d3a2889a
commit
45efa4e616
1 file changed
+9
-4
+9
-4
@@ -42,10 +42,15 @@ tmp_svcj="NO"
|
||||
|
||||
mount_tmpmfs()
|
||||
{
|
||||
while read line; do
|
||||
case $line in
|
||||
/dev/md[0-9]*\ /tmp)
|
||||
return;;
|
||||
while read _dev _ _ _ _ _mp; do
|
||||
case ${_mp} in
|
||||
/tmp)
|
||||
case ${_dev} in
|
||||
tmpfs|/dev/md[0-9]*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done <<*EOF
|
||||
$(df /tmp)
|
||||
|
||||
Reference in new issue
Block a user