view core/sysvinit/rc.start @ 354:9e73ecc6fe75

graphics/gtk: fix PKGNAME
author David Demelier <markand@malikania.fr>
date Fri, 29 Mar 2019 13:35:16 +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