tmpmfs="YES" and going from single user to multi user mode

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Sun Dec 17 23:55:44 PST 2006


On Sun, 17 Dec 2006 13:06-0800, Doug Barton wrote:

> We look forward to your patches to implement that suggestion. You
> might want to ask on the freebsd-rc@ list if you need help.

How about this patch?

*** /etc/rc.d/tmp	Sun May  7 06:00:26 2006
--- tmp	Mon Dec 18 08:40:40 2006
***************
*** 42,49 ****
  #
  case "${tmpmfs}" in
  [Yy][Ee][Ss])
! 	mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
! 	chmod 01777 /tmp
  	;;
  [Nn][Oo])
  	;;
--- 42,54 ----
  #
  case "${tmpmfs}" in
  [Yy][Ee][Ss])
!         if [ -n "`mount | grep '/tmp' | grep '^/dev/md'`" ]; then
! 		echo "*** /tmp is already mounted as a MFS."
! 		echo "*** No need to mount yet another MFS."
!         else
! 		mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
! 		chmod 01777 /tmp
! 	fi
  	;;
  [Nn][Oo])
  	;;

-- 
----------------------------------------------------------------------
Trond Endrestøl                          |   trond at fagskolen.gjovik.no
Patron of The Art of Computer Programming|   FreeBSD 6.1-S & Pine 4.64


More information about the freebsd-stable mailing list