summaryrefslogtreecommitdiff
path: root/share/man/man5/rc.conf.5
blob: 8c6e941c4246d6c88e1d70b7288c3ddff09b473a (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
.\"	$NetBSD: rc.conf.5,v 1.162 2015/10/09 19:49:25 plunky Exp $
.\"
.\" Copyright (c) 1996 Matthew R. Green
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" Copyright (c) 1997 Curt J. Sampson
.\" Copyright (c) 1997 Michael W. Long
.\" Copyright (c) 1998-2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This document is derived from works contributed to The NetBSD Foundation
.\" by Luke Mewburn.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. The name of the author may not be used to endorse or promote products
.\"    derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd July 9, 2015
.Dt RC.CONF 5
.Os
.Sh NAME
.Nm rc.conf
.Nd system startup configuration file
.Sh DESCRIPTION
The
.Nm
file specifies which services are enabled during system startup by
the startup scripts invoked by
.Pa /etc/rc
(see
.Xr rc 8 ) ,
and the shutdown scripts invoked by
.Pa /etc/rc.shutdown .
The
.Nm
file is a shell script that is sourced by
.Xr rc 8 ,
meaning that
.Nm
must contain valid shell commands.
.Pp
Listed below are the standard
.Nm
variables that may be set, the values to which each may be set,
a brief description of what each variable does, and a reference to
relevant manual pages.
Third party packages may test for additional variables.
.Pp
By default,
.Nm
reads
.Pa /etc/defaults/rc.conf
(if it is readable)
to obtain default values for various variables, and the end-user
may override these by appending appropriate entries to the end of
.Nm .
.Pp
.Xr rc.d 8
scripts that use
.Ic load_rc_config
from
.Xr rc.subr 8
also support sourcing an optional end-user provided per-script override
file
.Pa /etc/rc.conf.d/ Ns Ar service ,
(where
.Ar service
is the contents of the
.Sy name
variable in the
.Xr rc.d 8
script).
This may contain variable overrides, including allowing the end-user
to override various
.Ic run_rc_command
.Xr rc.d 8
control variables, and thus changing the operation of the script
without requiring editing of the script.
.Ss Variable naming conventions and data types
Most variables are one of two types: enabling variables or flags
variables.
Enabling variables, such as
.Sy inetd ,
are generally named after the program or the system they enable,
and have boolean values (specified using
.Sq Ic YES ,
.Sq Ic TRUE ,
.Sq Ic ON
or
.Sq Ic 1
for true, and
.Sq Ic NO ,
.Sq Ic FALSE ,
.Sq Ic OFF
or
.Sq Ic 0
for false, with the values being case insensitive).
Flags variables, such as
.Sy inetd_flags
have the same name with "_flags" appended, and determine what
arguments are passed to the program if it is enabled.
.Pp
If a variable that
.Xr rc 8
expects to be set is not set, or the value is not one of the allowed
values, a warning will be printed.
.Ss Overall control
.Bl -tag -width net_interfaces
.It Sy do_rcshutdown
Boolean value.
If false,
.Xr shutdown 8
will not run
.Pa /etc/rc.shutdown .
.It Sy rcshutdown_rcorder_flags
A string.
Extra arguments to the
.Xr rcorder 8
run by
.Pa /etc/rc.shutdown .
.It Sy rcshutdown_timeout
A number.
If non-blank, use this as the number of seconds to run a watchdog timer for
which will terminate
.Pa /etc/rc.shutdown
if the timer expires before the shutdown script completes.
.It Sy rc_configured
Boolean value.
If false then the system will drop into single-user mode during boot.
.It Sy rc_fast_and_loose
If set to a non-empty string,
each script in
.Pa /etc/rc.d
will be executed in the current shell rather than a sub shell.
This may be faster on slow machines that have an expensive
.Xr fork 2
operation.
.Bl -hang
.It Em Note :
Use this at your own risk!
A rogue command or script may inadvertently prevent boot to multiuser.
.El
.It Sy rc_rcorder_flags
A string.
Extra arguments to the
.Xr rcorder 8
run by
.Pa /etc/rc .
.It Sy rc_directories
A string.
Space separated list of directories searched for rc scripts.
The default is
.Pa /etc/rc.d .
All directories in
.Ev rc_directories
must be located in the root file system, otherwise they will be silently
skipped.
.It Sy rc_silent
Boolean value.
If true then the usual output is suppressed, and
.Xr rc 8
invokes the command specified in the
.Va rc_silent_cmd
variable once for each line of suppressed output.
The default value of
.Va rc_silent
is set from the
.Dv AB_SILENT
flag in the kernel's
.Va boothowto
variable (see
.Xr boot 8 ,
.Xr reboot 2 ) .
.It Sy rc_silent_cmd
A command to be executed once per line of suppressed output, when
.Va rc_silent
is true.
The default value of
.Va rc_silent_cmd
is
.Dq twiddle ,
which will display a spinning symbol instead of each line of output.
Another useful value is
.Dq \&: ,
which will display nothing at all.
.El
.Ss Basic network configuration
.Bl -tag -width net_interfaces
.It Sy defaultroute
A string.
Default IPv4 network route.
If empty or not set, then the contents of
.Pa /etc/mygate
(if it exists) are used.
.It Sy defaultroute6
A string.
Default IPv6 network route.
If empty or not set, then the contents of
.Pa /etc/mygate6
(if it exists) are used.
.It Sy domainname
A string.
.Tn NIS
(YP) domain of host.
If empty or not set, then the contents of
.Pa /etc/defaultdomain
(if it exists) are used.
.It Sy force_down_interfaces
A space separated list of interface names.
These interfaces will be configured down when going from multiuser to single-user
mode or on system shutdown.
.Pp
This is important for some stateful interfaces, for example PPP over ISDN
connections that cost money by connection time or PPPoE interfaces which
have no direct means of noticing
.Dq disconnect
events.
.Pp
All active
.Xr pppoe 4
and
.Xr ippp 4
interfaces will be automatically added to this list.
.It Sy hostname
A string.
Name of host.
If empty or not set, then the contents of
.Pa /etc/myname
(if it exists) are used.
.El
.Ss Boottime file-system and swap configuration
.Bl -tag -width net_interfaces
.It Sy critical_filesystems_local
A string.
File systems mounted very early in the system boot before networking
services are available.
Usually
.Pa /var
is part of this, because it is needed by services such as
.Xr dhclient 8
which may be required to get the network operational.
The default is
.Dq "OPTIONAL:/var" ,
where the
.Dq "OPTIONAL:"
prefix means that it's not an error if the file system is not
present in
.Xr fstab 5 .
.It Sy critical_filesystems_remote
A string.
File systems such as
.Pa /usr
that may require network services to be available to mount,
that must be available early in the system boot for general services to use.
The default is
.Dq "OPTIONAL:/usr" ,
where the
.Dq "OPTIONAL:"
prefix means that it is not an error if the file system is not
present in
.Xr fstab 5 .
.It Sy fsck_flags
A string.
A file system is checked with
.Xr fsck 8
during boot before mounting it.
This option may be used to override the default command-line options
passed to the
.Xr fsck 8
program.
.Pp
When set to
.Fl y ,
.Xr fsck 8
assumes yes as the answer to all operator questions during file system checks.
This might be important with hosts where the administrator does not have
access to the console and an unsuccessful shutdown must not make the host
unbootable even if the file system checks would fail in preen mode.
.It Sy no_swap
Boolean value.
Should be true if you have deliberately configured your system with no swap.
If false and no swap devices are configured, the system will warn you.
.It Sy resize_root
Boolean value.
Set to true to have the system resize the root file system to fill its
partition.
Will only attempt to resize the root file system if it is of type ffs and does
not have logging enabled.
Defaults to false.
.It Sy swapoff
Boolean value.
Remove block-type swap devices at shutdown time.
Useful if swapping onto RAIDframe devices.
.El
.Ss Block device subsystems
.Bl -tag -width net_interfaces
.It Sy ccd
Boolean value.
Configures concatenated disk devices according to
.Xr ccd.conf 5 .
.It Sy cgd
Boolean value.
Configures cryptographic disk devices.
Requires
.Pa /etc/cgd/cgd.conf .
See
.Xr cgdconfig 8
for additional details.
.It Sy lvm
Boolean value.
Configures the logical volume manager.
See
.Xr lvm 8
for additional details.
.It Sy raidframe
Boolean value.
Configures
.Xr raid 4 ,
RAIDframe disk devices.
See
.Xr raidctl 8
for additional details.
.El
.Ss One-time actions to perform or programs to run on boot-up
.Bl -tag -width net_interfaces
.It Sy accounting
Boolean value.
Enables process accounting with
.Xr accton 8 .
Requires
.Pa /var/account/acct
to exist.
.It Sy clear_tmp
Boolean value.
Clear
.Pa /tmp
after reboot.
.It Sy dmesg
Boolean value.
Create
.Pa /var/run/dmesg.boot
from the output of
.Xr dmesg 8 .
Passes
.Sy dmesg_flags .
.It Sy envsys
Boolean value.
Sets preferences for the environmental systems framework,
.Xr envsys 4 .
Requires
.Pa /etc/envsys.conf ,
which is described in
.Xr envsys.conf 5 .
.It Sy gpio
Boolean value.
Configure
.Xr gpio 4
devices.
See
.Xr gpio.conf 5 .
.It Sy ldconfig
Boolean value.
Configures
.Xr a.out 5
runtime link editor directory cache.
.It Sy mixerctl
Boolean value.
Read
.Xr mixerctl.conf 5
for how to set mixer values.
List in
.Sy mixerctl_mixers
the devices whose settings are to be saved at shutdown and
restored at start-up.
.It Sy newsyslog
Boolean value.
Run
.Nm newsyslog
to trim log files before syslogd starts.
Intended for laptop users.
Passes
.Sy newsyslog_flags .
.It Sy per_user_tmp
Boolean value.
Enables a per-user
.Pa /tmp
directory.
.Sy per_user_tmp_dir
can be used to override the default location of the
.Dq real
temporary directories,
.Dq Pa /private/tmp .
See
.Xr security 7
for additional details.
.It Sy quota
Boolean value.
Checks and enables quotas by running
.Xr quotacheck 8
and
.Xr quotaon 8 .
.It Sy random_seed
Boolean value.
During boot-up, runs the
.Xr rndctl 8
utility with the
.Fl L
flag to seed the random number subsystem from an entropy file.
During shutdown, runs the
.Xr rndctl 8
utility with the
.Fl S
flag to save some random information to the entropy file.
The entropy file name is specified by the
.Sy random_file
variable, and defaults to
.Pa /var/db/entropy-file .
The entropy file must be on a local file system that is writable early during
boot-up (just after the file systems specified in
.Sy critical_filesystems_local
have been mounted), and correspondingly late during shutdown.
.It Sy rndctl
Boolean value.
Runs the
.Xr rndctl 8
utility one or more times according to the specification in
.Sy rndctl_flags .
.Pp
If
.Sy rndctl_flags
does not contain a semicolon
.Pq Ql \&;
then it is expected to contain zero or more flags,
followed by one or more device or type names.
The
.Xr rndctl 8
command will be executed once for each device or type name.
If the specified flags do not include any of
.Fl c , C , e ,
or
.Fl E ,
then the flags
.Fl c
and
.Fl e
are added, to specify that entropy from the relevant device or type
should be both collected and estimated.
If the specified flags do not include either of
.Fl d
or
.Fl t ,
then the flag
.Fl d
is added, to specify that the non-flag arguments are device names,
not type names.
.Pp
.Sy rndctl_flags
may contain multiple semicolon-separated segments, in which each
segment contains flags and device or type names as described above.
This allows different flags to be associated with different
device or type names.
For example, given
.Li rndctl_flags="wd0 wd1; -t tty; -c -t net" ,
the following commands will be executed:
.Li "rndctl -c -e -d wd0" ;
.Li "rndctl -c -e -d wd1" ;
.Li "rndctl -c -e -t tty" ;
.Li "rndctl -c -t net" .
.It Sy rtclocaltime
Boolean value.
Sets the real time clock to local time by adjusting the
.Xr sysctl 7
value of
.Pa kern.rtc_offset .
The offset from UTC is calculated automatically according
to the time zone information in the file
.Pa /etc/localtime .
.It Sy savecore
Boolean value.
Runs the
.Xr savecore 8
utility.
Passes
.Sy savecore_flags .
The directory where crash dumps are stored is specified by
.Sy savecore_dir .
The default setting is
.Dq Pa /var/crash .
.It Sy sysdb
Boolean value.
Builds various system databases, including
.Pa /var/run/dev.cdb ,
.Pa /etc/spwd.db ,
.Pa /var/db/netgroup.db ,
.Pa /var/db/services.cdb ,
and entries for
.Xr utmp 5 .
.It Sy tpctl
Boolean value.
Run
.Xr tpctl 8
to calibrate touch panel device.
Passes
.Sy tpctl_flags .
.It Sy update_motd
Boolean value.
Updates the
.Nx
version string in the
.Pa /etc/motd
file to reflect the version of the running kernel.
See
.Xr motd 5 .
.It Sy virecover
Boolean value.
Send notification mail to users if any recoverable files exist in
.Pa /var/tmp/vi.recover .
Read
.Xr virecover 8
for more information.
.It Sy wdogctl
Boolean value.
Configures watchdog timers.
Passes
.Sy wdogctl_flags .
Refer to
.Xr wdogctl 8
for information on how to configure a timer.
.El
.Ss System security settings
.Bl -tag -width net_interfaces
.It Sy securelevel
A number.
The system securelevel is set to the specified value early
in the boot process, before any external logins, or other programs
that run users job, are started.
If set to nothing, the default action is taken, as described in
.Xr init 8
and
.Xr secmodel_securelevel 9 ,
which contains definitive information about the system securelevel.
Note that setting
.Sy securelevel
to 0 in
.Nm
will actually result in the system booting with securelevel set to 1, as
.Xr init 8
will raise the level when
.Xr rc 8
completes.
.It Sy permit_nonalpha
Boolean value.
Allow passwords to include non-alpha characters, usually to allow
NIS/YP netgroups.
.It Sy veriexec
Boolean value.
Load Veriexec fingerprints during startup.
Read
.Xr veriexecctl 8
for more information.
.It Sy veriexec_strict
A number.
Controls the strict level of Veriexec.
Level 0 is learning mode, used when building the signatures file.
It will only output messages but will not enforce anything.
Level 1 will only prevent access to files with a fingerprint
mismatch.
Level 2 will also deny writing to and removing of
monitored files, as well as enforce access type (as specified in
the signatures file).
Level 3 will take a step further and prevent
access to files that are not monitored.
.It Sy veriexec_verbose
A number.
Controls the verbosity of Veriexec.
Recommended operation is at level 0, verbose output (mostly used when
building the signatures file) is at level 1.
Level 2 is for debugging only and should not be used.
.It Sy veriexec_flags
A string.
Flags to pass to the
.Nm veriexecctl
command.
.El
.Ss Networking startup
.Bl -tag -width net_interfaces
.It Sy altqd
Boolean value.
ALTQ configuration/monitoring daemon.
Passes
.Sy altqd_flags .
.It Sy auto_ifconfig
Boolean value.
Sets the
.Sy net_interfaces
variable (see below) to the output of
.Xr ifconfig 8
with the
.Dq Li -l
flag and suppresses warnings about interfaces in this list that
do not have an ifconfig file or variable.
.It Sy dhclient
Boolean value.
Set true to configure some or all network interfaces using
the ISC DHCP client.
If you set
.Sy dhclient
true, then
.Pa /var
must be in
.Sy critical_filesystems_local ,
or
.Pa /var
must be on the root file system,
or you must modify the
.Sy dhclient_flags
variable to direct the DHCP client to store the leases file
in some other directory on the root file system.
You must not provide ifconfig information or ifaliases
information for any interface that is to be configured using the DHCP client.
Interface aliases can be set up in the DHCP client configuration
file if needed - see
.Xr dhclient.conf 5
for details.
.Pp
Passes
.Sy dhclient_flags
to the DHCP client.
See
.Xr dhclient 8
for complete documentation.
If you wish to configure all broadcast
network interfaces using the DHCP client, you can leave this blank.
To configure only specific interfaces, name the interfaces to be configured
on the command line.
.Pp
If you must run the DHCP client before mounting critical file systems,
then you should specify an alternate location for the DHCP client's lease
file in the
.Sy dhclient_flags
variable - for example, "-lf /tmp/dhclient.leases".
.It Sy dhcpcd
Boolean value.
Set true to configure some or all network interfaces using dhcpcd.
If you set
.Sy dhcpcd
true, then
.Pa /var
must be in
.Sy critical_filesystems_local ,
or
.Pa /var
must be on the root file system.
If you need to restrict dhcpcd to one or a number of interfaces,
or need a separate configuration per interface,
then this should be done in the configuration file - see
.Xr dhcpcd.conf 5
for details.
dhcpcd presently ignores the
.Sy wpa_supplicant
variable in rc.conf and will start wpa_supplicant if a suitable
wpa_supplicant.conf is found unless otherwise instructed in
.Xr dhcpcd.conf 5 .
.It Sy dhcpcd_flags
Passes
.Sy dhcpcd_flags
to dhcpcd.
See
.Xr dhcpcd 8
for complete documentation.
.It Sy flushroutes
Boolean value.
Flushes the route table on networking startup.
Useful when coming up to multiuser mode after going down to
single-user mode.
.It Sy ftp_proxy
Boolean value.
Runs
.Xr ftp-proxy 8 ,
the proxy daemon for the Internet File Transfer Protocol.
.It Sy hostapd
Boolean value.
Runs
.Xr hostapd 8 ,
the authenticator for IEEE 802.11 networks.
.It Sy ifaliases_*
A string.
List of
.Sq Em "address netmask"
pairs to configure additional network addresses for the given
configured interface
.Dq *
(e.g.
.Sy ifaliases_le0 ) .
If
.Em netmask
is
.Dq - ,
then use the default netmask for the interface.
.Pp
.Sy ifaliases_*
covers limited cases only and is considered unrecommended.
We recommend using
.Sy ifconfig_nnX
variables or
.Pa /etc/ifconfig.xxN
files with multiple lines instead.
.It Sy ifwatchd
Boolean value.
Monitor dynamic interfaces and perform actions upon address changes.
Passes
.Sy ifwatchd_flags .
.It Sy ip6mode
A string.
An IPv6 node can be a router
.Pq nodes that forward packet for others
or a host
.Pq nodes that do not forward .
A host can be autoconfigured
based on the information advertised by adjacent IPv6 routers.
By setting
.Sy ip6mode
to
.Dq Li router ,
.Dq Li host ,
or
.Dq Li autohost ,
you can configure your node as a router,
a non-autoconfigured host, or an autoconfigured host.
Invalid values will be ignored, and the node will be configured as
a non-autoconfigured host.
You may want to check
.Sy rtsol
and
.Sy rtsold
as well, if you set the variable to
.Dq Li autohost .
.It Sy ip6uniquelocal
Boolean value.
If
.Sy ip6mode
is equal to
.Dq Li router ,
and
.Sy ip6uniquelocal
is false,
a reject route will be installed on boot to avoid misconfiguration relating
to unique-local addresses.
If
.Sy ip6uniquelocal
is true, the reject route won't be installed.
.It Sy ipfilter
Boolean value.
Runs
.Xr ipf 8
to load in packet filter specifications from
.Pa /etc/ipf.conf
at network boot time, before any interfaces are configured.
Passes
.Sy ipfilter_flags .
See
.Xr ipf.conf 5 .
.It Sy ipfs
Boolean value.
Runs
.Xr ipfs 8
to save and restore information for ipnat and ipfilter state tables.
The information is stored in
.Pa /var/db/ipf/ipstate.ipf
and
.Pa /var/db/ipf/ipnat.ipf .
Passes
.Sy ipfs_flags .
.It Sy ipmon
Boolean value.
Runs
.Xr ipmon 8
to read
.Xr ipf 8
packet log information and log it to a file or the system log.
Passes
.Sy ipmon_flags .
.It Sy ipmon_flags
A string.
Specifies arguments to supply to
.Xr ipmon 8 .
Defaults to
.Dq Li -ns .
A typical example would be
.Dq Fl nD Pa /var/log/ipflog
to have
.Xr ipmon 8
log directly to a file bypassing
.Xr syslogd 8 .
If the
.Dq -D
argument is used, remember to modify
.Pa /etc/newsyslog.conf
accordingly; for example:
.Bd -literal
/var/log/ipflog  640  10  100  *  Z  /var/run/ipmon.pid
.Ed
.It Sy ipnat
Boolean value.
Runs
.Xr ipnat 8
to load in the IP network address translation (NAT) rules from
.Pa /etc/ipnat.conf
at network boot time, before any interfaces are configured.
See
.Xr ipnat.conf 5 .
.It Sy ipsec
Boolean value.
Runs
.Xr setkey 8
to load in IPsec manual keys and policies from
.Pa /etc/ipsec.conf
at network boot time, before any interfaces are configured.
.It Sy net_interfaces
A string.
The list of network interfaces to be configured at boot time.
For each interface "xxN", the system first looks for ifconfig
parameters in the variable
.Sy ifconfig_xxN ,
and then in the file
.Pa /etc/ifconfig.xxN .
If
.Sy auto_ifconfig
is false, and neither the variable nor the file is found,
a warning is printed.
Information in either the variable or the file is parsed identically,
except that, if an
.Sy ifconfig_xxN
variable contains a single line with embedded semicolons,
then the value is split into multiple lines prior to further parsing,
treating the semicolon as a line separator.
.Pp
One common case it to set the
.Sy ifconfig_xxN
variable to a set of arguments to be passed to an
.Xr ifconfig 8
command after the interface name.
Refer to
.Xr ifconfig.if 5
for more details on
.Pa /etc/ifconfig.xxN
files, and note that the information there also applies to
.Sy ifconfig_xxN
variables (after the variables are split into lines).
.It Sy ntpdate
Boolean value.
Runs
.Xr ntpdate 8
to set the system time from one of the hosts in
.Sy ntpdate_hosts .
If
.Sy ntpdate_hosts
is empty, it will attempt to find a list of hosts in
.Pa /etc/ntp.conf .
Passes
.Sy ntpdate_flags .
.It Sy pf
Boolean value.
Enable
.Xr pf 4
at network boot time:
Load the initial configuration
.Xr pf.boot.conf 5
before the network is up.
After the network has been configured, then load the final rule set
.Xr pf.conf 5 .
.It Sy pf_rules
A string.
The path of the
.Xr pf.conf 5
rule set that will be used when loading the final rule set.
.It Sy pflogd
Boolean value.
Run
.Xr pflogd 8
for dumping packet filter logging information to a file.
.It Sy ppp
A boolean.
Toggles starting
.Xr pppd 8
on startup.
See
.Sy ppp_peers
below.
.It Sy ppp_peers
A string.
If
.Sy ppp
is true and
.Sy ppp_peers
is not empty, then
.Pa /etc/rc.d/ppp
will check each word in
.Sy ppp_peers
for a corresponding ppp configuration file in
.Pa /etc/ppp/peers
and will call
.Xr pppd 8
with the
.Dq call Sy peer
option.
.It Sy racoon
Boolean value.
Runs
.Xr racoon 8 ,
the IKE (ISAKMP/Oakley) key management daemon.
.It Sy rtsol
Boolean value.
Run
.Xr rtsol 8 ,
router solicitation command for IPv6 hosts.
On nomadic hosts like notebook computers, you may want to enable
.Sy rtsold
as well.
Passes
.Sy rtsol_flags .
This is only for autoconfigured IPv6 hosts, so set
.Sy ip6mode
to
.Dq Li autohost
if you use it.
.It Sy wpa_supplicant
Boolean value.
Run
.Xr wpa_supplicant 8 ,
WPA/802.11i Supplicant for wireless network devices.
If you set
.Sy wpa_supplicant
true, then
.Pa /usr
must be in
.Sy critical_filesystems_local ,
or
.Pa /usr
must be on the root file system.
dhcpcd ignores this variable, see the
.Sy dhcpcd
variable for details.
.El
.Ss Daemons required by other daemons
.Bl -tag -width net_interfaces
.It Sy inetd
Boolean value.
Runs the
.Xr inetd 8
daemon to start network server processes (as listed in
.Pa /etc/inetd.conf )
as necessary.
Passes
.Sy inetd_flags .
The
.Dq Li -l
flag turns on libwrap connection logging.
.It Sy rpcbind
Boolean value.
The
.Xr rpcbind 8
daemon is required for any
.Xr rpc 3
services.
These include NFS,
.Tn NIS ,
.Xr rpc.bootparamd 8 ,
.Xr rpc.rstatd 8 ,
.Xr rpc.rusersd 8 ,
and
.Xr rpc.rwalld 8 .
Passes
.Sy rpcbind_flags .
.El
.Ss Commonly used daemons
.Bl -tag -width net_interfaces
.It Sy cron
Boolean value.
Run
.Xr cron 8 .
.It Sy ftpd
Boolean value.
Runs the
.Xr ftpd 8
daemon and passes
.Sy ftpd_flags .
.It Sy httpd
Boolean value.
Runs the
.Xr httpd 8
daemon and passes
.Sy httpd_flags .
.It Sy httpd_wwwdir
A string.
The
.Xr httpd 8
WWW root directory.
Used only if
.Sy httpd
is true.
The default setting is
.Dq Pa /var/www .
.It Sy httpd_wwwuser
A string.
If non-blank and
.Sy httpd
is true, run
.Xr httpd 8
and cause it to switch to the specified user after initialization.
It is preferred to
.Sy httpd_user
because
.Xr httpd 8
is requiring extra privileges to start listening on default port 80.
The default setting is
.Dq Dv _httpd .
.It Sy lpd
Boolean value.
Runs
.Xr lpd 8
and passes
.Sy lpd_flags .
The
.Dq Li -l
flag will turn on extra logging.
.It Sy mdnsd
Boolean value.
Runs
.Xr mdnsd 8 .
.It Sy named
Boolean value.
Runs
.Xr named 8
and passes
.Sy named_flags .
.It Sy named_chrootdir
A string.
If non-blank and
.Sy named
is true, run
.Xr named 8
as the unprivileged user and group
.Sq named ,
.Xr chroot 2 Ns ed
to
.Sy named_chrootdir .
.Sy named_chrootdir Ns Pa /var/run/log
will be added to the list of log sockets that
.Xr syslogd 8
listens to.
.It Sy ntpd
Boolean value.
Runs
.Xr ntpd 8
and passes
.Sy ntpd_flags .
.It Sy ntpd_chrootdir
A string.
If non-blank and
.Sy ntpd
is true, run
.Xr ntpd 8
as the unprivileged user and group
.Sq ntpd ,
.Xr chroot 2 Ns ed
to
.Sy ntpd_chrootdir .
.Sy ntpd_chrootdir Ns Pa /var/run/log
will be added to the list of log sockets that
.Xr syslogd 8
listens to.
This option requires that the kernel has
.Dl pseudo-device clockctl
compiled in, and that
.Pa /dev/clockctl
is present.
.It Sy postfix
Boolean value.
Starts
.Xr postfix 1
mail system.
.It Sy sshd
Boolean value.
Runs
.Xr sshd 8
and passes
.Sy sshd_flags .
.It Sy syslogd
Boolean value.
Runs
.Xr syslogd 8
and passes
.Sy syslogd_flags .
.It Sy timed
Boolean value.
Runs
.Xr timed 8
and passes
.Sy timed_flags .
The
.Dq Li -M
option allows
.Xr timed 8
to be a master time source as well as a slave.
If you are also running
.Xr ntpd 8 ,
only one machine running both should have the
.Dq Li -M
flag given to
.Xr timed 8 .
.El
.Ss Routing daemons
.Bl -tag -width net_interfaces
.It Sy mrouted
Boolean value.
Runs
.Xr mrouted 8 ,
the DVMRP multicast routing protocol daemon.
Passes
.Sy mrouted_flags .
.It Sy route6d
Boolean value.
Runs
.Xr route6d 8 ,
the RIPng routing protocol daemon for IPv6.
Passes
.Sy route6d_flags .
.It Sy routed
Boolean value.
Runs
.Xr routed 8 ,
the RIP routing protocol daemon.
Passes
.Sy routed_flags .
.\" This should be false
.\" if
.\" .Sy gated
.\" is true.
.It Sy rtsold
Boolean value.
Runs
.Xr rtsold 8 ,
the IPv6 router solicitation daemon.
.Xr rtsold 8
periodically transmits router solicitation packets
to find IPv6 routers on the network.
This configuration is mainly for nomadic hosts like notebook computers.
Stationary hosts should work fine with just
.Sy rtsol .
Passes
.Sy rtsold_flags .
This is only for autoconfigured IPv6 hosts, so set
.Sy ip6mode
to
.Dq Li autohost
if you use it.
.El
.Ss Daemons used to boot other hosts over a network
.Bl -tag -width net_interfaces
.It Sy bootparamd
Boolean value.
Runs
.Xr bootparamd 8 ,
the boot parameter server, with
.Sy bootparamd_flags
as options.
Used to boot
.Nx
and
.Tn "SunOS 4.x"
systems.
.It Sy dhcpd
Boolean value.
Runs
.Xr dhcpd 8 ,
the Dynamic Host Configuration Protocol (DHCP) daemon,
for assigning IP addresses to hosts and passing boot information.
Passes
.Sy dhcpd_flags .
.It Sy dhcrelay
Boolean value.
Runs
.Xr dhcrelay 8 .
Passes
.Sy dhcrelay_flags .
.It Sy mopd
Boolean value.
Runs
.Xr mopd 8 ,
the
.Tn DEC
.Tn MOP
protocol daemon; used for booting
.Tn VAX
and other
.Tn DEC
machines.
Passes
.Sy mopd_flags .
.It Sy ndbootd
Boolean value.
Runs
.Xr ndbootd 8 ,
the Sun Network Disk (ND) Protocol server.
Passes
.Sy ndbootd_flags .
.It Sy rarpd
Boolean value.
Runs
.Xr rarpd 8 ,
the reverse ARP daemon, often used to boot
.Nx
and Sun workstations.
Passes
.Sy rarpd_flags .
.It Sy rbootd
Boolean value.
Runs
.Xr rbootd 8 ,
the
.Tn HP
boot protocol daemon; used for booting
.Tn HP
workstations.
Passes
.Sy rbootd_flags .
.It Sy rtadvd
Boolean value.
Runs
.Xr rtadvd 8 ,
the IPv6 router advertisement daemon, which is used to advertise
information about the subnet to IPv6 end hosts.
Passes
.Sy rtadvd_flags .
This is only for IPv6 routers, so set
.Sy ip6mode
to
.Dq Li router
if you use it.
.El
.Ss X Window System daemons
.Bl -tag -width net_interfaces
.It Sy xdm
Boolean value.
Runs the
.Xr xdm 1
X display manager.
These X daemons are available only with the optional X distribution of
.Nx .
.It Sy xfs
Boolean value.
Runs the
.Xr xfs 1
X11 font server, which supplies local X font files to X terminals.
.El
.Ss NIS (YP) daemons
.Bl -tag -width net_interfaces
.It Sy ypbind
Boolean value.
Runs
.Xr ypbind 8 ,
which lets
.Tn NIS
(YP) clients use information from a
.Tn NIS
server.
Passes
.Sy ypbind_flags .
.It Sy yppasswdd
Boolean value.
Runs
.Xr yppasswdd 8 ,
which allows remote
.Tn NIS
users to update password on master server.
Passes
.Sy yppasswdd_flags .
.It Sy ypserv
Boolean value.
Runs
.Xr ypserv 8 ,
the
.Tn NIS
(YP) server for distributing information from certain files in
.Pa /etc .
Passes
.Sy ypserv_flags .
The
.Dq Li -d
flag causes it to use DNS for lookups in
.Pa /etc/hosts
that fail.
.El
.Ss NFS daemons and parameters
.Bl -tag -width net_interfaces
.It Sy amd
Boolean value.
Runs
.Xr amd 8 ,
the automounter daemon, which automatically mounts NFS file systems
whenever a file or directory within that file system is accessed.
Passes
.Sy amd_flags .
.It Sy amd_dir
A string.
The
.Xr amd 8
mount directory.
Used only if
.Sy amd
is true.
.It Sy lockd
Boolean value.
Runs
.Xr rpc.lockd 8
if
.Sy nfs_server
and/or
.Sy nfs_client
are true.
Passes
.Sy lockd_flags .
.It Sy mountd
Boolean value.
Runs
.Xr mountd 8
and passes
.Sy mountd_flags .
.It Sy nfs_client
Boolean value.
The number of local NFS asynchronous I/O server is now controlled via
.Xr sysctl 8 .
.It Sy nfs_server
Boolean value.
Sets up a host to be a NFS server by running
.Xr nfsd 8
and passing
.Sy nfsd_flags .
.It Sy statd
Boolean value.
Runs
.Xr rpc.statd 8 ,
a status monitoring daemon used when
.Xr rpc.lockd 8
is running, if
.Sy nfs_server
and/or
.Sy nfs_client
are true.
Passes
.Sy statd_flags .
.El
.Ss Bluetooth support
.Bl -tag -width net_interfaces
.It Sy bluetooth
Boolean value.
Configure Bluetooth support, comprising the following tasks:
.Bl -dash -compact
.It
attach serial Bluetooth controllers as listed in the
.Pa /etc/bluetooth/btattach.conf
configuration file.
.It
enable Bluetooth controllers with useful defaults, plus
additional options as detailed below.
.It
optionally, start
.Xr bthcid 8 ,
the Bluetooth Link Key/PIN Code manager, passing
.Sy bthcid_flags .
.It
configure local Bluetooth drivers as listed in the
.Pa /etc/bluetooth/btdevctl.conf
configuration file.
.It
optionally, start
.Xr sdpd 8 ,
the Service Discovery server, passing
.Sy sdpd_flags .
.El
.It Sy btconfig_devices
A string.
An optional list of Bluetooth controllers to configure.
.It Sy btconfig_{dev}
A string.
Additional configuration options for specific Bluetooth controllers.
.It Sy btconfig_args
A string.
Additional configuration options for Bluetooth controllers without
specific options as above.
.It Sy bthcid
Boolean value.
If set to false, disable starting the Bluetooth Link Key/PIN Code manager.
.It Sy sdpd
Boolean value.
If set to false, disable starting the Bluetooth Service Discovery server.
.El
.Ss Other daemons
.Bl -tag -width net_interfaces
.It Sy identd
Boolean value.
Runs
.Xr identd 8 ,
the daemon for the user identification protocol.
Passes
.Sy identd_flags .
.It Sy iscsi_target
Boolean value.
Runs the server for iSCSI requests,
.Xr iscsi-target 8 .
Passes
.Sy iscsi_target_flags .
.It Sy isdnd
Boolean value.
Runs
.Xr isdnd 8 ,
the isdn4bsd ISDN connection management daemon.
Passes
.Sy isdnd_flags .
.It Sy isdn_autoupdown
Boolean value.
Set all configured ISDN interfaces to
.Dq up .
If
.Sy isdn_interfaces
is not blank, only the listed interfaces will be modified.
Used only if
.Sy isdnd
is true.
.It Sy kdc
Boolean value.
Runs the
.Xr kdc 8
Kerberos v4 and v5 server.
This should be run on Kerberos master and slave servers.
.It Sy rwhod
Boolean value.
Runs
.Xr rwhod 8
to support the
.Xr rwho 1
and
.Xr ruptime 1
commands.
.El
.Ss Hardware daemons
.Bl -tag -width net_interfaces
.It Sy apmd
Boolean value.
Runs
.Xr apmd 8
and passes
.Sy apmd_flags .
.It Sy irdaattach
Boolean value.
Runs
.Xr irdaattach 8
and passes
.Sy irdaattach_flags .
.It Sy moused
Boolean value.
Runs
.Xr moused 8 ,
to pass serial mouse data to the wscons mouse mux.
Passes
.Sy moused_flags .
.It Sy screenblank
Boolean value.
Runs
.Xr screenblank 1
and passes
.Sy screenblank_flags .
.It Sy wscons
Boolean value.
Configures the
.Xr wscons 4
console driver, from the configuration file
.Pa /etc/wscons.conf .
.It Sy wsmoused
Boolean value.
Runs
.Xr wsmoused 8 ,
to provide copy and paste text support in wscons displays.
Passes
.Sy wsmoused_flags .
.El
.Sh FILES
.Bl -tag -width /etc/defaults/rc.conf -compact
.It Pa /etc/rc.conf
The file
.Nm
resides in
.Pa /etc .
.It Pa /etc/defaults/rc.conf
Default settings for
.Nm ,
sourced by
.Nm
before the end-user configuration section.
.It Pa /etc/rc.conf.d/ Ns Ar foo
.Ar foo Ns No -specific
.Nm
overrides.
.El
.Sh SEE ALSO
.Xr boot 8 ,
.Xr rc 8 ,
.Xr rc.d 8 ,
.Xr rc.subr 8 ,
.Xr rcorder 8
.Sh HISTORY
The
.Nm
file appeared in
.Nx 1.3 .