Check-in [67838bd249]
Logged in as anonymous
Overview
Comment:fix devd, fix order, change daemonizing process, adding nfsd
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 67838bd2497626c5cac35c7787f4322e85566475d3db151e8f71882b0e328cb8
User & Date: arcade on 2019-10-21 14:21:35.793
Other Links: manifest | tags
Context
2019-10-21
15:12
adding starters, renaming stuff check-in: ebafd89015 user: arcade tags: trunk
14:21
fix devd, fix order, change daemonizing process, adding nfsd check-in: 67838bd249 user: arcade tags: trunk
10:37
rework daemonization, export enable variables and add checks for them check-in: 716b0393df user: arcade tags: trunk
Changes
1
2
3

1
2

3


-
+
# vim:ft=make:

DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig
DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig nfsclient
Modified Makefile from [b46cb7ad36] to [0bc4666f63].
30
31
32
33
34
35
36
37
38
39


40
41
42


43
44
45
46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65

66
67
68
69
70
71



30
31
32
33
34
35
36



37
38
39


40
41


42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61

62
63

64
65
66
67
68
69
70







-
-
-
+
+

-
-
+
+
-
-










-
+









-
+

-




+
+
+

LOGIN: DAEMON

NETWORK:

SERVERS:

mountlate: mount cleanvar

mount:
SERVICE:
.endif

cleanvar: mount

test:
	echo Empty target.
nfsclient: NETWORK
.endif

TARGETS:=${SCRIPTS:S/.init//:S/.service//}

.MAIN: ${TARGETS}

.PHONY: ${TARGETS} ${OTHER_TARGETS}

.undef TARGETS OTHER_TARGETS

.for file in ${SCRIPTS}
.info ${file}
#.info ${file}
.include "${file}"
.endfor

.undef SCRIPTS

ENABLED=${:!env!:C/=.*//:M*_ENABLE}

.for var in ${ENABLED}
.if !empty(${var}:tl:Mno)
#.info ${var}
.info ${var}
.undef ${var}
.unexport ${var}
.endif
.endfor

.undef ENABLED
.unexport-env
.export
.info ${:!env!}
Added SERVICE.init version [9af2593c09].
1
2
3
4
5
6
7

8
9
1
2
3
4
5
6

7
8
9






-
+


# vim:ft=make:

DAEMON_automountd_COMMAND?=/usr/sbin/autmountd
DAEMON_automountd_ENABLE?=no
DAEMON_automountd_MODULES=autofs

automountd: _daemon nfsclient
automountd: _daemon # nfsclient -> DAEMON
.export DAEMON_$@_ENABLE
	test -z "$${DAEMON_$@_ENABLE}" || /usr/sbin/automount
1
2
3
4
5

1
2
3
4

5




-
+
# vim:ft=make:

bootfs: fsck
	: Checking whether we need /boot mounted.
	mount -vadr | grep -q ' /boot$$' && mount -r /boot || exit 0
	mount -vadr | grep -q ' /boot$$' && mount -r /boot || true
1
2
3
4
5
6
7
8
9

1
2
3
4
5
6
7


8







-
-
+
# vim:ft=make:

DAEMON_devd_COMMAND?=/sbin/devd
DAEMON_devd_ENABLE?=yes
DAEMON_devd_FLAGS?=-dq

devd: _service
.export DAEMON_$@_ENABLE
	test -z "$${DAEMON_$@_ENABLE}" || sysctl hw.bus.devctl_disable=1
	test -n "$${DAEMON_$@_ENABLE}" || sysctl hw.bus.devctl_disable=1
1
2
3
4
5
6
7

1
2
3
4
5
6

7






-
+
# vim:ft=make:

DAEMON_dhcpcd_COMMAND?=/sbin/dhcpcd
DAEMON_dhcpcd_ENABLE?=no
DAEMON_dhcpcd_FLAGS?=-B

dhcpcd: _service mount cleanvar NETWORK
dhcpcd: _service NETWORK SERVICE # mount -> SERVICE, cleanvar -> SERVICE
Added mountd.service version [0f08f29ddb].
Added nfsclient.init version [c3da5a4199].
Added nfsd.service version [f4319844ee].
Added rpcbind.service version [52ec9f435b].
1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
1
2
3
4
5
6
7

8
9
10
11
12
13
14
15







-
+







LOCAL_TARGETS:=_daemon_svc _service_svc
OTHER_TARGETS+=${LOCAL_TARGETS}
.if ${DAEMONIZER} == "svc"
LOCAL_TARGETS:=${LOCAL_TARGETS} ${LOCAL_TARGETS:S/_svc//}
.endif

.for target in ${LOCAL_TARGETS}
${target}: ${target:M_daemon:DDAEMON} .USE
${target}: ${target:C/_daemon.*/DAEMON/:C/_service.*/SERVICE/} .USE
#.export DAEMON_$@_ENABLE
	env | grep $@
	test -z "$${DAEMON_$@_ENABLE}" || { \
	  test -n "${DAEMON_$@_MODULES}" && kldload -n ${DAEMON_$@_MODULES} || true; \
	  svc -u ${DAEMON_$@_USER:Uroot} -g ${DAEMON_$@_GROUP:Uwheel} init $@ ${DAEMON_$@_COMMAND} ${DAEMON_$@_FLAGS}; \
	}
.endfor