From owner-svn-src-head@freebsd.org Sat Sep 28 09:12:43 2019 Return-Path: Delivered-To: svn-src-head@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 59FAD12125E; Sat, 28 Sep 2019 09:12:43 +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) server-signature RSA-PSS (4096 bits) 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 46gNGz1dmCz40mR; Sat, 28 Sep 2019 09:12:43 +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 1C0CA272B9; Sat, 28 Sep 2019 09:12:43 +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 x8S9CgOK048454; Sat, 28 Sep 2019 09:12:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8S9Cfrl048448; Sat, 28 Sep 2019 09:12:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201909280912.x8S9Cfrl048448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 28 Sep 2019 09:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352836 - in head/libexec/rc: . rc.d X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/libexec/rc: . rc.d X-SVN-Commit-Revision: 352836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2019 09:12:43 -0000 Author: trasz Date: Sat Sep 28 09:12:41 2019 New Revision: 352836 URL: https://svnweb.freebsd.org/changeset/base/352836 Log: Move the SysV IPC stuff out of the 'abi' rc script, into a new one: 'sysvipc' - it has nothing to do with ABIs, and I'd like to later rename 'abi' to 'linux', which better describes its purpose and also matches the rcvar name. Reviewed by: emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21615 Added: head/libexec/rc/rc.d/sysvipc - copied, changed from r352676, head/libexec/rc/rc.d/abi Modified: head/libexec/rc/rc.conf head/libexec/rc/rc.d/Makefile head/libexec/rc/rc.d/SERVERS head/libexec/rc/rc.d/abi head/libexec/rc/rc.d/localpkg Modified: head/libexec/rc/rc.conf ============================================================================== --- head/libexec/rc/rc.conf Sat Sep 28 08:57:29 2019 (r352835) +++ head/libexec/rc/rc.conf Sat Sep 28 09:12:41 2019 (r352836) @@ -638,8 +638,6 @@ accounting_enable="NO" # Turn on process accounting (o firstboot_sentinel="/firstboot" # Scripts with "firstboot" keyword are run if # this file exists. Should be on a R/W filesystem so # the file can be deleted after the boot completes. - -# Emulation/compatibility services provided by /etc/rc.d/abi sysvipc_enable="NO" # Load System V IPC primitives at startup (or NO). linux_enable="NO" # Linux binary compatibility loaded at startup (or NO). clear_tmp_enable="NO" # Clear /tmp at startup. Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Sat Sep 28 08:57:29 2019 (r352835) +++ head/libexec/rc/rc.d/Makefile Sat Sep 28 09:12:41 2019 (r352836) @@ -107,6 +107,7 @@ CONFS= DAEMON \ swaplate \ sysctl \ syslogd \ + sysvipc \ tmp \ ugidfw \ ${_utx} \ Modified: head/libexec/rc/rc.d/SERVERS ============================================================================== --- head/libexec/rc/rc.d/SERVERS Sat Sep 28 08:57:29 2019 (r352835) +++ head/libexec/rc/rc.d/SERVERS Sat Sep 28 09:12:41 2019 (r352836) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote sysvipc abi ldconfig savecore watchdogd # This is a dummy dependency, for early-start servers relying on # some basic configuration. Modified: head/libexec/rc/rc.d/abi ============================================================================== --- head/libexec/rc/rc.d/abi Sat Sep 28 08:57:29 2019 (r352835) +++ head/libexec/rc/rc.d/abi Sat Sep 28 09:12:41 2019 (r352836) @@ -14,14 +14,6 @@ desc="Enable foreign ABIs" start_cmd="${name}_start" stop_cmd=":" -sysv_start() -{ - echo -n ' sysvipc' - load_kld sysvmsg - load_kld sysvsem - load_kld sysvshm -} - linux_start() { local _tmpdir @@ -48,12 +40,11 @@ abi_start() local _echostop _echostop= - if checkyesno sysvipc_enable || checkyesno linux_enable; then + if checkyesno linux_enable; then echo -n 'Additional ABI support:' _echostop=yes fi - checkyesno sysvipc_enable && sysv_start checkyesno linux_enable && linux_start [ -n "${_echostop}" ] && echo '.' Modified: head/libexec/rc/rc.d/localpkg ============================================================================== --- head/libexec/rc/rc.d/localpkg Sat Sep 28 08:57:29 2019 (r352835) +++ head/libexec/rc/rc.d/localpkg Sat Sep 28 09:12:41 2019 (r352836) @@ -4,7 +4,7 @@ # # PROVIDE: localpkg -# REQUIRE: abi +# REQUIRE: sysvipc abi # BEFORE: securelevel # KEYWORD: shutdown Copied and modified: head/libexec/rc/rc.d/sysvipc (from r352676, head/libexec/rc/rc.d/abi) ============================================================================== --- head/libexec/rc/rc.d/abi Wed Sep 25 10:46:05 2019 (r352676, copy source) +++ head/libexec/rc/rc.d/sysvipc Sat Sep 28 09:12:41 2019 (r352836) @@ -3,60 +3,23 @@ # $FreeBSD$ # -# PROVIDE: abi +# PROVIDE: sysvipc # REQUIRE: archdep # KEYWORD: nojail . /etc/rc.subr -name="abi" -desc="Enable foreign ABIs" +name="sysvipc" +desc="Load SysV IPC modules" +rcvar="sysvipc_enable" start_cmd="${name}_start" stop_cmd=":" -sysv_start() +sysvipc_start() { - echo -n ' sysvipc' load_kld sysvmsg load_kld sysvsem load_kld sysvshm -} - -linux_start() -{ - local _tmpdir - - echo -n ' linux' - load_kld -e 'linux(aout|elf)' linux - case `sysctl -n hw.machine_arch` in - amd64) - load_kld -e 'linux64elf' linux64 - ;; - esac - if [ -x /compat/linux/sbin/ldconfigDisabled ]; then - _tmpdir=`mktemp -d -t linux-ldconfig` - /compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache - if ! cmp -s ${_tmpdir}/ld.so.cache /compat/linux/etc/ld.so.cache; then - cat ${_tmpdir}/ld.so.cache > /compat/linux/etc/ld.so.cache - fi - rm -rf ${_tmpdir} - fi -} - -abi_start() -{ - local _echostop - - _echostop= - if checkyesno sysvipc_enable || checkyesno linux_enable; then - echo -n 'Additional ABI support:' - _echostop=yes - fi - - checkyesno sysvipc_enable && sysv_start - checkyesno linux_enable && linux_start - - [ -n "${_echostop}" ] && echo '.' } load_rc_config $name