view core/sysvinit/rc.start @ 291:d8615f7d508e

x11/xmodmap: initial import, closes #1377
author David Demelier <markand@malikania.fr>
date Fri, 22 Mar 2019 21:08:00 +0100
parents 36f3ab3945d7
children 01b5d3175215
line wrap: on
line source

#
# /etc/rc.start: runlevel control script
#

if [ "$#" -ne 1 ]; then
	echo "usage: $0 runlevel" 1>&2
	exit 1
fi

if [ -f /etc/rc.conf ]; then
	source /etc/rc.conf
fi

# Start user services requested in rc.conf(5).
for s in $SERVICES; do
	#
	# Services are requested in the form name[:runlevel], if runlevel is
	# specified the service is started only if the system runlevel is
	# greater or equal to the request.
	#
	name="${s%%:*}"
	level="${s##*:}"

	# No minimum level, set to requested.
	if [ -z "$level" ]; then
		level="$1"
	fi

	if [ -x /etc/rc.d/$name ] && [ "$level" -le "$1" ]; then
		/etc/rc.d/$name start
	fi
done