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 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"