Overview
| Comment: | finalize order, service names, naming, defaults etc. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
04f7295047340a3a85ca519e4b9963c4 |
| User & Date: | arcade on 2022-05-30 13:17:07.283 |
| Other Links: | manifest | tags |
Context
|
2022-05-30
| ||
| 21:16 | fix ordering, test compat mode, new services check-in: 4d5a9b2632 user: arcade tags: trunk | |
| 13:17 | finalize order, service names, naming, defaults etc. check-in: 04f7295047 user: arcade tags: trunk | |
| 08:07 | rebuild starters and enable shutdown, add license check-in: d8511a3d7c user: arcade tags: trunk | |
Changes
Modified boinc-client.service.mk
from [db6d46f83e]
to [e8972efdb9].
1 | DAEMON_boinc-client_COMMAND?=/usr/local/bin/boinc_client | | > | 1 2 3 4 5 | DAEMON_boinc-client_COMMAND?=/usr/local/bin/boinc_client DAEMON_boinc-client_FLAGS?=--redirectio --dir /var/db/boinc DAEMON_boinc-client_BACKGROUND?=-daemon DAEMON_boinc-client_ENABLE?=no DAEMON_boinc-client_USER?=boinc |
Modified bsdstat.service.mk
from [64e882cb35]
to [6aa8fb2273].
|
| | | | | | | 1 2 3 4 5 6 |
DAEMON_bsdstat_COMMAND?=/usr/local/etc/periodic/monthly/300.statistics
DAEMON_bsdstat_ENABLE?=no
DAEMON_bsdstat_FLAGS?=-nodelay
bsdstat: ${_SERVICE_PLAIN}
bsdstat_exit:
|
Modified daemon.starter.mk
from [6caf751c64]
to [24d4175fc0].
1 2 3 4 5 6 7 |
_service_daemon: .USE
daemon -c -u ${DAEMON_$@_USER:Uroot} -r -P /var/run/daemon.$@.pid ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON$@_FOREGROUND}
_service_daemon_status: .USE
echo "Not supported yet."
_service_daemon_exit: .USEBEFORE
| | | 1 2 3 4 5 6 7 8 |
_service_daemon: .USE
daemon -c -u ${DAEMON_$@_USER:Uroot} -r -P /var/run/daemon.$@.pid ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON$@_FOREGROUND}
_service_daemon_status: .USE
echo "Not supported yet."
_service_daemon_exit: .USEBEFORE
kill -TERM /var/run/daemon.${@:S/_exit//}.pid
|
Modified example.service_mk
from [dff5bc2e0f]
to [6f72b6462f].
| ︙ | ︙ | |||
21 22 23 24 25 26 27 | # kernel modules to load prior to service start DAEMON_example_MODULES?= # user to run service as DAEMON_example_USER?=root # extra commands to execute before starting service | | | < < | < < < < > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# kernel modules to load prior to service start
DAEMON_example_MODULES?=
# user to run service as
DAEMON_example_USER?=root
# extra commands to execute before starting service
# ${_SERVICE} - starts after root mount appear
# ${_EARLYSERVICE} - not required on early boot
# you also can select specific starter by inheriting class by full name:
# ${_(EARLY)?SERVICE(_(SVC|DAEMON|PLAIN))?}
example: ${_EARLYSERVICE}
: run commands that should go before the service start
|
Modified nfsd.service.mk
from [f0933474bf]
to [db973c0dae].
1 2 3 4 5 6 7 8 9 10 11 12 13 |
DAEMON_nfsd_COMMAND?=/sbin/nfsd
DAEMON_nfsd_ENABLE?=no
DAEMON_nfsd_FLAGS?=-u -t -n 4
.if empty(DAEMON_nfsd_ENABLE:tl:Mno)
DAEMON_rpcbind_ENABLE=yes
DAEMON_mountd_ENABLE=yes
.endif
nfsd: mountd ${_SERVICE} rpcbind
.if empty(NFS_RESERVED_PORT_ONLY:tl:Mno)
sysctl vfs.nfs.nfs_privport=1
.endif
| < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
DAEMON_nfsd_COMMAND?=/sbin/nfsd
DAEMON_nfsd_ENABLE?=no
DAEMON_nfsd_FLAGS?=-u -t -n 4
.if empty(DAEMON_nfsd_ENABLE:tl:Mno)
DAEMON_rpcbind_ENABLE=yes
DAEMON_mountd_ENABLE=yes
.endif
nfsd: mountd ${_SERVICE} rpcbind
.if empty(NFS_RESERVED_PORT_ONLY:tl:Mno)
sysctl vfs.nfs.nfs_privport=1
.endif
|
Modified starter.mk
from [d6bb3354cb]
to [bc7d3b9e6c].
1 2 3 4 | OTHER_TARGETS+=_service_pre STARTER?=svc | | | > > | > > > | | | | | | | 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 35 36 37 38 39 40 |
OTHER_TARGETS+=_service_pre
STARTER?=svc
_service_check: .USEBEFORE
# check whether service is enabled
if [ -z "$${DAEMON_$@_ENABLE}" ]; then \
exit 0; \
fi
_service_pre: .USEBEFORE
echo "MRC:$@> Starting service."
# kldload modules if any
if [ -n "${DAEMON_$@_MODULES}" ]; then \
kldload -n ${DAEMON_$@_MODULES}; \
fi
_service_post_exit: .USE
echo "MRC:${@:S/_exit//}> stopped."
.for starter_source in ${:!find /etc/mrc -name '*.starter.mk'!:S/\/etc\/mrc\///}
starter:=${starter_source:S/.starter.mk$//}
Starter:=${starter:tu}
OTHER_TARGETS:=${OTHER_TARGETS} _service_${starter} _service_${starter}_exit _service_${starter}_status
_SERVICE_${Starter}:=_service_pre DAEMON _service_${starter} _service_check
_EARLYSERVICE_${Starter}:=_service_pre SERVICE _service_${starter} _service_check
_SERVICE_${Starter}_EXIT:=_service_${starter}_exit _service_post_exit
.if "${STARTER}" == "${starter}"
_SERVICE:=_service_pre DAEMON _service_${starter} _service_check
_EARLYSERVICE:=_service_pre SERVICE _service_${starter} _service_check
_SERVICE_EXIT:=_service_${starter}_exit _service_post_exit
.endif
.export
.include "${starter_source}"
.endfor
|
Modified svc.starter.mk
from [e9599f6a11]
to [fde94af6be].
1 2 | _service_svc: .USE svc list $@ | grep -q $@ || \ | | | > | | 1 2 3 4 5 6 7 8 9 10 |
_service_svc: .USE
svc list $@ | grep -q $@ || \
svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} ${DAEMON_$@_RESTART:D-r} ${DAEMON_$@_RESTART} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON_$@_FOREGROUND}
_service_svc_status: .USE
svc status ${@:S/_status//}
_service_svc_exit: .USEBEFORE
svc list ${@:S/_exit//} | grep -q ${@:S/_exit//} || true && \
svc -s exit ${@:S/_exit//}
|