Diff
Logged in as anonymous

Differences From Artifact [435c42a9e4]:

To Artifact [b2c2cec872]:


1
2
3
4
5
6
7
8
9
10
11
12





13
14
15
16












17
18
19
20
21
22
23
1
2
3
4
5
6
7
8




9
10
11
12
13
14
15


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34








-
-
-
-
+
+
+
+
+


-
-
+
+
+
+
+
+
+
+
+
+
+
+







OTHER_TARGETS+=_service_pre

STARTER?=svc

_service_check: .USEBEFORE
	# check whether service is enabled
	if [ -z "$${DAEMON_$@_ENABLE}" -a -z "${FORCE}" ]; then \
		exit 0 ;\
	fi ;\
	for CMD in ${DAEMON_$@_COMMAND}; do \
		if [ -x $${CMD} ]; then \
			export CMD ;\
	fi
	# check for first present executable
	for COMMAND in ${DAEMON_$@_COMMAND}; do \
		if [ -x $${COMMAND} ]; then \
			export CMD="${COMMAND}" ;\
			break ;\
		fi ;\
	done ;\
	echo $${CMD}
	done
	# bail out if binary not found
	if [ -z $${CMD} ]; then \
		MRC:$@> Executable not found.
		exit 0 ;\
	fi
	# check for rtprio/idprio
	if [ -n "$${DAEMON_$@_IDPRIO}" ]; then \
		export CMD="/usr/sbin/idprio $${DAEMON_$@_IDPRIO} $${CMD}" ;\
	elif [ -n "$${DAEMON_$@_RTPRIO}" ]; then \
		export CMD="/usr/sbin/rtprio $${DAEMON_$@_RTPRIO} $${CMD}" ;\
	fi

_service_pre: .USEBEFORE
	# kldload modules if any
	echo "MRC:$@> Starting service." ;\
	if [ -n "${DAEMON_$@_MODULES}" ]; then \
		kldload -n ${DAEMON_$@_MODULES}; \
	fi