Diff
Logged in as anonymous

Differences From Artifact [d4088447d2]:

To Artifact [2f8a6c06fb]:


1
2
3
4
5


6
7
8

9
10

11
12

13
14
15
16

17
18
19
20
21
22
23
1
2
3


4
5
6
7

8
9

10
11

12
13
14
15

16
17
18
19
20
21
22
23



-
-
+
+


-
+

-
+

-
+



-
+







# Meta targets

TARGETS+=adjkerntz bootfs cleanvar cleartmp cloned devfs dmesg dumpon fsck \
	hostname ifconfig kld ldconfig microcode mixer mount mountlate msgs \
	newsyslog nextboot nfsclient pwcheck random root rpc_umntall runshm \
	hostname kld ldconfig microcode mixer mount mountlate msgs netif \
	newsyslog nextboot nfsclient pf pwcheck random root rpc_umntall runshm \
	savecore swap sysctl sysdb wlans

DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig nfsclient cleartmp
DAEMON: pwcheck sysctl sysdb NETWORK SERVERS ldconfig nfsclient cleartmp pflogd

LOGIN: DAEMON dntpd msgs powerd
LOGIN: DAEMON dntpd msgs powerd pflogd

NETWORK: ifconfig devd hostname
NETWORK: netif devd hostname

SERVERS: swap mountlate syslogd newsyslog

SERVICE: ifconfig mount random hostname cleanvar
SERVICE: netif mount random hostname cleanvar

# regular targets

adjkerntz: random mount
	echo "MRC:$@> Adjust kernel timezone."
	adjkerntz -i

105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
105
106
107
108
109
110
111









112
113
114
115
116
117
118







-
-
-
-
-
-
-
-
-







	   ;; \
	esac

hostname:
	echo "MRC:$@> Setting to ${HOSTNAME}."
	hostname ${HOSTNAME}

ifconfig: adjkerntz wlans cloned kld
	echo "MRC:$@> Starting interfaces: ${IFCONFIG_IFACES}"
.for iface in ${IFCONFIG_IFACES}
.for item in ${IFCONFIG_${iface}:tW:ts;}
	ifconfig ${iface} ${item}
.endfor
.undef _IFCONFIG_ARGS
.endfor

kld: bootfs
.if defined(KLD_LIST)
	echo "MRC:$@> Loading kernel modules: ${KLD_LIST}"
	kldload -n ${KLD_LIST}
.endif

.for path in ${LDCONFIG_PATHS} /etc/ld-elf.so.conf
189
190
191
192
193
194
195






















196
197
198
199
200
201
202
203
204
205
206


207
208
209
210
211
212





213
214
215


216

217
218
219
220
221
222
223
224
225

226
227
228
229
230
231
232
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217


218
219
220





221
222
223
224
225



226
227

228
229
230
231
232
233
234
235
236

237
238
239
240
241
242
243
244







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+









-
-
+
+

-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
-
+








-
+








.if empty(NFSCLIENT_ENABLE:tl:Mno)
DAEMON_rpcbind_ENABLE=yes
.endif

nfsclient: NETWORK rpcbind rpc_umntall
	test -z "$${NFSCLIENT_ENABLE}" || kldload -n nfs

netif: adjkerntz wlans cloned kld
	echo "MRC:$@> Starting interfaces: ${IFCONFIG_IFACES}"
.for iface in ${IFCONFIG_IFACES}
.for item in ${IFCONFIG_${iface}:tW:ts;}
	ifconfig ${iface} ${item}
.endfor
.undef _IFCONFIG_ARGS
.endfor

pf: pflogd
.if empty(PF_ENABLE:tl:Mno)
	echo "MRC:$@> Enabling and loading rules." ;\
	kldload -n pf || exit 1 ;\
	test -r ${PF_RULES} || {\
	  echo "MRC:$@> Can't find file with rules at ${PF_RULES}." ;\
	  exit 1 ;\
	} ;\
	pfctl -Fa || exit 1 ;\
	pfctl -f ${PF_RULES} ${PF_FLAGS} || exit 1 ;\
	pfctl -Si | grep -q Enabled && pfctl -e
.endif

pwcheck: mountlate syslogd
	echo "MRC:$@> Checking password lock file."
.if exists(/etc/ptmp)
	logger -s -p auth.err "password file may be incorrect -- /etc/ptmp \
	  exists"
.endif

random: mount devfs
	echo "MRC:$@> Seeding."
	sysctl kern.seedenable=1 > /dev/null
	echo "MRC:$@> Seeding." ;\
	sysctl kern.seedenable=1 > /dev/null ;\
	( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) 2>&1 | \
	  dd status=none of=/dev/random bs=8k
	cat /bin/ls | dd status=none of=/dev/random bs=8k
.if exists(ENTROPY_DIR) # XXX
.for file in ${:!find ${ENTROPY_DIR} -type f!}
	dd status=none if=${file} of=/dev/random bs=8k
	  dd status=none of=/dev/random bs=8k ;\
	dd if=/bin/ps status=none of=/dev/random bs=8k ;\
	test -d $${ENTROPY_DIR} && {\
	  find $${ENTROPY_DIR} -type f |\
	  xargs -n1 -Ifoo dd status=none if=foo of=/dev/random bs=8k ;\
.endfor
.elif exists(ENTROPY_FILE)
	dd status=none if=${ENTROPY_FILE} of=/dev/random bs=8k
	} || {\
	  dd status=none if=${ENTROPY_FILE} of=/dev/random bs=8k ;\
.endif
	} ;\
	sysctl kern.seedenable=0 > /dev/null

root: fsck bootfs
	echo "MRC:$@> Mount root R/W."
	mount -uo rw /
	umount -a

rpc_umntall: mountlate NETWORK rpcbind
.if empty(RPC_UMNTALL_ENABLE:tl:Mno) # XXX
.if empty(RPC_UMNTALL_ENABLE:tl:Mno)
	echo "MRC:$@> Sending RPC unmount notifications."; \
	test -f /var/db/mounttab || true && \
	  rpc.umntall -k &
.endif

runshm: cleanvar
	echo "MRC:$@> Mount and populate /var/run/shm."; \