From owner-svn-src-stable-12@freebsd.org Thu Aug 27 19:41:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83B4D3C1C17; Thu, 27 Aug 2020 19:41:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BctQN2twqz4gdN; Thu, 27 Aug 2020 19:41:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4782A9343; Thu, 27 Aug 2020 19:41:32 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07RJfWMS082810; Thu, 27 Aug 2020 19:41:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07RJfV2q082808; Thu, 27 Aug 2020 19:41:31 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008271941.07RJfV2q082808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 27 Aug 2020 19:41:31 +0000 (UTC) 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 X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/libexec/rc: . rc.d X-SVN-Commit-Revision: 364883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2020 19:41:32 -0000 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