svn commit: r352836 - in head/libexec/rc: . rc.d

Edward Tomasz Napierala trasz at FreeBSD.org
Sat Sep 28 09:12:43 UTC 2019


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


More information about the svn-src-all mailing list