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
|
.include "/etc/mrc.conf"
.export
DAEMONIZER?=svc.daemon
#.MAKE.JOBS?=2
.SILENT:
.include "${DAEMONIZER}"
.if defined(AUTOBOOT)
SCRIPTS=${:!find /etc/mrc -name '*.init' -o -name '*.service'!:S/\/etc\/mrc\///}
.ERROR:
: ERROR: ABORTING BOOT (sending SIGTERM to parent)!
: target ${.ERROR_TARGET} failed to execute:
: ${.ERROR_CMD}
kill 1
.else
SCRIPTS=${:!find /etc/mrc -name '*.service'!:S/\/etc\/mrc\///}
DAEMON:
.endif
TARGETS:=${SCRIPTS:S/.init//:S/.service//}
.MAIN: ${TARGETS}
.PHONY: ${TARGETS} _daemon _service
.for file in ${SCRIPTS}
.include "${file}"
.endfor
|
>
|
>
>
>
>
>
>
>
>
|
<
<
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
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
|
.include "/etc/mrc.conf"
.export
OTHER_TARGETS:=_daemon _service
DAEMONIZER?=svc
.for daemonizer in ${:!find /etc/mrc -name '*.daemon.mk'!:S/\/etc\/mrc\///}
.include "${daemonizer}"
.endfor
.if !target(_daemon) || !target(_service)
.error No daemonizer defined.
.endif
#.MAKE.JOBS?=2
#.SILENT:
.if defined(AUTOBOOT)
SCRIPTS=${:!find /etc/mrc -name '*.init' -o -name '*.service'!:S/\/etc\/mrc\///}
.ERROR:
: ERROR: ABORTING BOOT (sending SIGTERM to parent)!
: target ${.ERROR_TARGET} failed to execute:
: ${.ERROR_CMD}
kill 1
.else
SCRIPTS=${:!find /etc/mrc -name '*.service'!:S/\/etc\/mrc\///}
DAEMON: NETWORK SERVERS
LOGIN: DAEMON
NETWORK:
SERVERS:
mountlate: mount cleanvar
mount:
cleanvar: mount
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}
.include "${file}"
.endfor
.undef SCRIPTS
ENABLED=${:!env!:C/=.*//:M*_ENABLE}
.for var in ${ENABLED}
.if !empty(${var}:tl:Mno)
#.info ${var}
.undef ${var}
.unexport ${var}
.endif
.endfor
.undef ENABLED
|