ebafd89015 2019-10-21 1: LOCAL_TARGETS:=_service_daemon _earlyservice_daemon
ebafd89015 2019-10-21 2: OTHER_TARGETS+=${LOCAL_TARGETS}
be4f89a54b 2019-10-21 3: .if ${STARTER} == "daemon"
ebafd89015 2019-10-21 4: LOCAL_TARGETS+=_service _earlyservice
ebafd89015 2019-10-21 5: .endif
ebafd89015 2019-10-21 6:
ebafd89015 2019-10-21 7: .for target in ${LOCAL_TARGETS}
ebafd89015 2019-10-21 8: ${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice.*/SERVICE/} .USE
ebafd89015 2019-10-21 9: test -z "$${DAEMON_$@_ENABLE}" || { \
7a1e7f4a58 2019-10-21 10: echo "MRC:$@> Starting service."; \
ebafd89015 2019-10-21 11: test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
bc20f9df9f 2019-10-24 12: daemon -c -u ${DAEMON_$@_USER:Uroot} -r -P /var/run/daemon.$@.pid ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON$@_FOREGROUND}; \
ebafd89015 2019-10-21 13: }
ebafd89015 2019-10-21 14: .endfor
ebafd89015 2019-10-21 15:
ebafd89015 2019-10-21 16: .undef LOCAL_TARGETS