Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Aug 2020 19:41:31 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364883 - in stable/12/libexec/rc: . rc.d
Message-ID:  <202008271941.07RJfV2q082808@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu Aug 27 19:41:31 2020
New Revision: 364883
URL: https://svnweb.freebsd.org/changeset/base/364883

Log:
  MFC r354690:
  
  Add 'linux_mounts_enable' rc.conf(5) variable, to make it possible
  to disable mounting Linux-specific filesystems under /compat/linux
  when 'linux_enable' is set to YES.
  
  Relnotes:	yes
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/12/libexec/rc/rc.conf
  stable/12/libexec/rc/rc.d/linux
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rc/rc.conf
==============================================================================
--- stable/12/libexec/rc/rc.conf	Thu Aug 27 19:40:33 2020	(r364882)
+++ stable/12/libexec/rc/rc.conf	Thu Aug 27 19:41:31 2020	(r364883)
@@ -642,6 +642,8 @@ firstboot_sentinel="/firstboot"	# Scripts with "firstb
 			# the file can be deleted after the boot completes.
 sysvipc_enable="NO"	# Load System V IPC primitives at startup (or NO).
 linux_enable="NO"	# Linux binary compatibility loaded at startup (or NO).
+linux_mounts_enable="YES" # If linux_enable is set to YES, mount Linux-specific
+			# filesystems at startup.
 clear_tmp_enable="NO"	# Clear /tmp at startup.
 clear_tmp_X="YES" 	# Clear and recreate X11-related directories in /tmp
 ldconfig_insecure="NO"	# Set to YES to disable ldconfig security checks

Modified: stable/12/libexec/rc/rc.d/linux
==============================================================================
--- stable/12/libexec/rc/rc.d/linux	Thu Aug 27 19:40:33 2020	(r364882)
+++ stable/12/libexec/rc/rc.d/linux	Thu Aug 27 19:41:31 2020	(r364883)
@@ -46,12 +46,14 @@ linux_start()
 		sysctl kern.elf32.fallback_brand=3 > /dev/null
 	fi
 
-	_emul_path="/compat/linux"
-	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 -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 
+		_emul_path="/compat/linux"
+		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 -t fdescfs fdescfs "${_emul_path}/dev/fd"
+		mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm"
+	fi
 }
 
 load_rc_config $name



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008271941.07RJfV2q082808>