Overview
| Comment: | add default empty start target when it's absent, add flags to control background/foreground mode |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
bc20f9df9f2e157747310eb9bc38bb3f |
| User & Date: | arcade on 2019-10-24 10:31:23.364 |
| Other Links: | manifest | tags |
Context
|
2019-10-25
| ||
| 10:49 | 80 columns, error handling, microcode check-in: 8f8bbe5cbb user: arcade tags: trunk | |
|
2019-10-24
| ||
| 10:31 | add default empty start target when it's absent, add flags to control background/foreground mode check-in: bc20f9df9f user: arcade tags: trunk | |
| 10:30 | silence cleanvar error check-in: 527b45759d user: arcade tags: trunk | |
Changes
Modified Makefile
from [a202ff1787]
to [bb5a29dbec].
| ︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
echo Empty target.
TARGETS:=${SCRIPTS:S/.init.mk//:S/.service.mk//}
.for file in ${SCRIPTS}
#.info ${file}
.include "${file}"
.endfor
.include "init.mk"
.MAIN: ${TARGETS}
.PHONY: ${TARGETS} ${OTHER_TARGETS}
| > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
echo Empty target.
TARGETS:=${SCRIPTS:S/.init.mk//:S/.service.mk//}
.for file in ${SCRIPTS}
#.info ${file}
.include "${file}"
.if !target(${file:S/.service.mk//})
${file:S/.service.mk//}: _service
.endif
.endfor
.include "init.mk"
.MAIN: ${TARGETS}
.PHONY: ${TARGETS} ${OTHER_TARGETS}
|
| ︙ | ︙ |
Modified daemon.starter.mk
from [8d142dec6f]
to [a54a9d7816].
1 2 3 4 5 6 7 8 9 10 11 |
LOCAL_TARGETS:=_service_daemon _earlyservice_daemon
OTHER_TARGETS+=${LOCAL_TARGETS}
.if ${STARTER} == "daemon"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice.*/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
LOCAL_TARGETS:=_service_daemon _earlyservice_daemon
OTHER_TARGETS+=${LOCAL_TARGETS}
.if ${STARTER} == "daemon"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice.*/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
daemon -c -u ${DAEMON_$@_USER:Uroot} -r -P /var/run/daemon.$@.pid ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON$@_FOREGROUND}; \
}
.endfor
.undef LOCAL_TARGETS
|
Modified dbus.service.mk
from [3c4514b521]
to [b9cbed01b5].
1 2 3 4 5 6 7 8 9 |
DAEMON_dbus_COMMAND?=/usr/local/bin/dbus-daemon
DAEMON_dbus_ENABLE?=no
DAEMON_dbus_FLAGS?=--system
dbus: _service
test -z "$${DAEMON_$@_ENABLE}" || { \
/usr/local/bin/dbus-uuidgen --ensure; \
mkdir -p /var/run/dbus; \
}
| > > | 1 2 3 4 5 6 7 8 9 10 11 |
DAEMON_dbus_COMMAND?=/usr/local/bin/dbus-daemon
DAEMON_dbus_ENABLE?=no
DAEMON_dbus_FLAGS?=--system
DAEMON_dbus_BACKGROUND?=--fork
DAEMON_dbus_FOREGROUND?=--nofork
dbus: _service
test -z "$${DAEMON_$@_ENABLE}" || { \
/usr/local/bin/dbus-uuidgen --ensure; \
mkdir -p /var/run/dbus; \
}
|
Modified devd.service.mk
from [da6509a51a]
to [144a98e479].
1 2 | DAEMON_devd_COMMAND?=/sbin/devd DAEMON_devd_ENABLE?=yes | | | 1 2 3 4 5 6 |
DAEMON_devd_COMMAND?=/sbin/devd
DAEMON_devd_ENABLE?=yes
DAEMON_devd_FOREGROUND?=-dq
devd: _earlyservice
test -n "$${DAEMON_$@_ENABLE}" || sysctl hw.bus.devctl_disable=1
|
Modified dhcpcd.service.mk
from [159b100528]
to [aefa3d82f9].
1 2 | DAEMON_dhcpcd_COMMAND?=/sbin/dhcpcd DAEMON_dhcpcd_ENABLE?=no | > | | 1 2 3 4 5 6 | DAEMON_dhcpcd_COMMAND?=/sbin/dhcpcd DAEMON_dhcpcd_ENABLE?=no DAEMON_dhcpcd_BACKGROUND?=-b DAEMON_dhcpcd_FOREGROUND?=-B dhcpcd: _service NETWORK SERVICE # mount -> SERVICE, cleanvar -> SERVICE |
Modified dntpd.service.mk
from [d946b05541]
to [c1caeba9e3].
1 | DAEMON_dntpd_COMMAND?=/usr/sbin/dntpd | | | 1 2 3 4 | DAEMON_dntpd_COMMAND?=/usr/sbin/dntpd DAEMON_dntpd_FOREGROUND?=-F dntpd: _service NETWORK |
Modified plain.starter.mk
from [5d92358239]
to [e9639224a2].
1 2 3 4 5 6 7 8 9 10 11 |
LOCAL_TARGETS:=_service_plain _earlyservice_plain
OTHER_TARGETS+=${LOCAL_TARGETS}
.if ${STARTER} == "plain"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice.*/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
LOCAL_TARGETS:=_service_plain _earlyservice_plain
OTHER_TARGETS+=${LOCAL_TARGETS}
.if ${STARTER} == "plain"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice.*/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
chroot -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} / ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON_$@_BACKGROUND}; \
}
.endfor
.undef LOCAL_TARGETS
|
Modified slim.service.mk
from [177709f6b3]
to [08e8c873fa].
1 2 3 4 5 | DAEMON_slim_COMMAND?=/usr/local/bin/slim DAEMON_slim_ENABLE?=no slim: _service dbus rm -f /var/run/slim.auth | > | 1 2 3 4 5 6 | DAEMON_slim_COMMAND?=/usr/local/bin/slim DAEMON_slim_ENABLE?=no DAEMON_slim_BACKGROUND?=-d slim: _service dbus rm -f /var/run/slim.auth |
Modified smartd.service.mk
from [5fabaf4901]
to [e7f4a7cbc2].
1 2 | DAEMON_smartd_COMMAND?=/usr/local/sbin/smartd DAEMON_smartd_ENABLE?=no | | > | 1 2 3 4 5 6 7 8 9 10 11 |
DAEMON_smartd_COMMAND?=/usr/local/sbin/smartd
DAEMON_smartd_ENABLE?=no
DAEMON_smartd_FLAGS?=-c /usr/local/etc/smartd.conf
DAEMON_smartd_FOREGROUND?=-n
smartd: _service
test -z "$${DAEMON_$@_ENABLE}" || \
test -f /usr/local/etc/smartd.conf || { \
echo "MRC:$@> smartd requires config file to start." ; \
false; \
}
|
Modified sndiod.service.mk
from [a4c3036f6c]
to [aacbd053af].
1 2 | DAEMON_sndiod_COMMAND?=/usr/local/bin/sndiod DAEMON_sndiod_ENABLE?=no | | < < | 1 2 3 | DAEMON_sndiod_COMMAND?=/usr/local/bin/sndiod DAEMON_sndiod_ENABLE?=no DAEMON_sndiod_FLAGS?=-c 0:7 -j off -s default -m mon -s monitor |
Modified svc.starter.mk
from [29f41349a1]
to [e2c70aa6f7].
1 2 3 4 5 6 7 8 9 10 11 |
LOCAL_TARGETS:=_service_svc _earlyservice_svc
OTHER_TARGETS+=_service_svc _earlyservice_svc
.if ${STARTER} == "svc"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
LOCAL_TARGETS:=_service_svc _earlyservice_svc
OTHER_TARGETS+=_service_svc _earlyservice_svc
.if ${STARTER} == "svc"
LOCAL_TARGETS+=_service _earlyservice
.endif
.for target in ${LOCAL_TARGETS}
${target}: ${target:C/_service.*/DAEMON/:C/_earlyservice/SERVICE/} .USE
test -z "$${DAEMON_$@_ENABLE}" || { \
echo "MRC:$@> Starting service."; \
test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS} ${DAEMON_$@_FOREGROUND}; \
}
.endfor
.undef LOCAL_TARGETS
|
Modified watchdogd.service.mk
from [285328a074]
to [0a89759400].
1 2 | DAEMON_watchdogd_COMMAND?=/usr/sbin/watchdogd DAEMON_watchdogd_ENABLE?=no | | | 1 2 3 4 5 6 7 8 9 | DAEMON_watchdogd_COMMAND?=/usr/sbin/watchdogd DAEMON_watchdogd_ENABLE?=no DAEMON_watchdogd_FOREGROUND?=-d .if empty(:!sysctl -qn debug.watchdog || exit 0!) DAEMON_watchdogd_ENABLE=no .endif watchdogd: _earlyservice |