xref: /netbsd-src/share/man/man5/rc.conf.5 (revision 3b01aba77a7a698587faaae455bbfe740923c1f5)
1.\"	$NetBSD: rc.conf.5,v 1.47 2001/06/17 01:14:15 lukem Exp $
2.\"
3.\" Copyright (c) 1996 Matthew R. Green
4.\" Copyright (c) 1997 Curt J. Sampson
5.\" Copyright (c) 1997 Michael W. Long
6.\" Copyright (c) 1998-2000 The NetBSD Foundation, Inc.
7.\" All rights reserved.
8.\"
9.\" This document is derived from works contributed to The NetBSD Foundation
10.\" by Luke Mewburn.
11.\"
12.\" Redistribution and use in source and binary forms, with or without
13.\" modification, are permitted provided that the following conditions
14.\" are met:
15.\" 1. Redistributions of source code must retain the above copyright
16.\"    notice, this list of conditions and the following disclaimer.
17.\" 2. Redistributions in binary form must reproduce the above copyright
18.\"    notice, this list of conditions and the following disclaimer in the
19.\"    documentation and/or other materials provided with the distribution.
20.\" 3. The name of the author may not be used to endorse or promote products
21.\"    derived from this software without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
30.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.Dd June 17, 2001
36.Dt RC.CONF 5
37.Os
38.\" turn off hyphenation
39.hym 999
40.Sh NAME
41.Nm rc.conf
42.Nd system startup configuration file
43.Sh DESCRIPTION
44The
45.Nm
46file specifies which services are enabled during system startup by
47the startup scripts invoked by
48.Pa /etc/rc .
49The
50.Nm
51file is a shell script that is sourced by
52.Pa /etc/rc
53if it exists, meaning that
54.Nm
55must contain valid shell commands.
56.Pp
57Listed below are the
58.Nm
59variables that may be set, the values to which each may be set,
60a brief description of what each variable does, and a reference to
61relevant manual pages.
62.Pp
63Most variables are one of two types: enabling variables or flags
64variables.
65Enabling variables, such as
66.Sy inetd ,
67are generally named after the program or the system they enable,
68and are set to
69.Sq YES
70or
71.Sq NO .
72Flags variables, such as
73.Sy inetd_flags
74have the same name with "_flags" appended, and determine what
75arguments are passed to the program if it is enabled.
76.Pp
77If a variable that
78.Pa /etc/rc
79expects to be set is not set, or the value is not one of the allowed
80values, a warning will be printed.
81.Ss Overall control:
82.Bl -tag -width net_interfaces
83.It Sy rc_configured
84If this is not set to
85.Sq YES
86then the system will drop into single-user mode during boot.
87.It Sy do_rcshutdown
88If set to
89.Sq NO ,
90.Xr shutdown 8
91will not run
92.Pa /etc/rc.shutdown .
93.It Sy rcshutdown_timeout
94If non-blank, use this as the number of seconds to run a watchdog timer for
95which will terminate
96.Pa /etc/rc.shutdown
97if the timer expires before the shutdown script completes.
98.El
99.Ss Basic network configuration:
100.Bl -tag -width net_interfaces
101.It Sy hostname
102Name of host.
103If empty or not set, then the contents of
104.Pa /etc/myname
105(if it exists) are used.
106.It Sy domainname
107.Tn NIS
108(YP) domain of host.
109If empty or not set, then the contents of
110.Pa /etc/defaultdomain
111(if it exists) are used.
112.It Sy defaultroute
113Default network route.
114If empty or not set, then the contents of
115.Pa /etc/mygate
116(if it exists) are used.
117.El
118.Ss Boottime file-system and swap configuration:
119.Bl -tag -width net_interfaces
120.It Sy critical_filesystems_beforenet
121File systems mounted very early in the system boot before networking
122services are available.
123Usually
124.Pa /var
125is part of this, because it is needed by services such as
126.Xr dhclient 8
127which may be required to get the network operational.
128.It Sy critical_filesystems
129File systems such as
130.Pa /usr
131that may require network services to be available to mount,
132that must be available early in the system boot for general services to use.
133.It Sy no_swap
134Set the
135.Sy no_swap
136variable to
137.Sq YES
138if you have configured your system with no swap on purpose.
139If not set, or set to anything other than
140.Sq YES ,
141and no swap devices
142are configured, the system will warn you.
143.El
144.Ss One-time actions to perform or programs to run on boot-up:
145.Bl -tag -width net_interfaces
146.It Sy lkm
147.Sq YES
148or
149.Sq NO .
150Runs
151.Pa /etc/rc.lkm .
152.It Sy savecore
153.Sq YES
154or
155.Sq NO .
156Runs the
157.Xr savecore 8
158utility.
159Passes
160.Sy savecore_flags .
161.It Sy clear_tmp
162.Sq YES
163or
164.Sq NO .
165Clear /tmp after reboot.
166.It Sy update_motd
167.Sq YES
168or
169.Sq NO .
170Updates the
171.Nx
172version string in the
173.Pa /etc/motd
174file to reflect the version of the running kernel.
175See
176.Xr motd 5 .
177.It Sy dmesg
178.Sq YES
179or
180.Sq NO .
181Create
182.Pa /var/run/dmesg.boot
183from the output of
184.Xr dmesg 8 .
185Passes
186.Sy dmesg_flags .
187.It Sy accounting
188.Sq YES
189or
190.Sq NO .
191Enables process accounting with
192.Xr accton 8 .
193Requires
194.Pa /var/account/acct
195to exist.
196.El
197.Ss System security setting:
198.Bl -tag -width net_interfaces
199.It Sy securelevel
200A number.
201The system securelevel is set to the specified value early
202in the boot process, before any external logins, or other programs
203that run users job, are started.
204If set to nothing, the default action is taken, as described in
205.Xr init 8 ,
206which contains definitive information about the system securelevel.
207.El
208.Ss Networking startup:
209.Bl -tag -width net_interfaces
210.It Sy ipfilter
211.Sq YES
212or
213.Sq NO .
214Runs
215.Xr ipf 8
216to load in packet filter specifications from
217.Pa /etc/ipf.conf
218at network boot time, before any interfaces are configured.
219See
220.Xr ipf.conf 5 .
221.It Sy ipnat
222Runs
223.Xr ipnat 8
224to load in the IP network address translation (NAT) rules from
225.Pa /etc/ipnat.conf
226at network boot time, before any interfaces are configured.
227See
228.Xr ipnat.conf 5 .
229.It Sy ipsec
230.Sq YES
231or
232.Sq NO .
233Runs
234.Xr setkey 8
235to load in IPsec manual keys and policies from
236.Pa /etc/ipsec.conf
237at network boot time, before any interfaces are configured.
238.It Sy ipmon
239.Sq YES
240or
241.Sq NO .
242Runs
243.Xr ipmon 8
244to read
245.Xr ipf 8
246packet log information and log it to a file or the system log.
247Passes
248.Sy ipmon_flags .
249.It Sy auto_ifconfig
250.Sq YES
251or
252.Sq NO .
253Sets the
254.Sy net_interfaces
255variable (see below) to the output of
256.Xr ifconfig 8
257with the
258.Dq Li -l
259flag and suppresses warnings about interfaces in this list that
260do not have an ifconfig file or variable.
261.It Sy net_interfaces
262The list of network interfaces to be configured at boot time.
263For each interface "xxN", the system first looks for ifconfig
264parameters in
265.Pa /etc/ifconfig.xxN
266and then in the variable
267.Sy ifconfig_xxN .
268The contents of the file or the variable are handed to ifconfig
269after the interface name.
270If
271.Sy auto_ifconfig
272is set to "NO" and neither the file nor the variable is found,
273a warning is printed.
274Refer to
275.Xr ifconfig.if 5
276for more details on
277.Pa /etc/ifconfig.xxN .
278.It Sy ifaliases_*
279List of
280.Sq Em "address netmask"
281pairs to configure additional network addresses for the given
282configured interface
283.Dq *
284(e.g.
285.Sy ifaliases_le0 ) .
286If
287.Em netmask
288is
289.Dq - ,
290then use the default netmask for the interface.
291.Pp
292.Sy ifaliases_*
293covers limited cases only and considered unrecommended.
294We recommend using
295.Pa /etc/ifconfig.xxN
296with multiple lines instead.
297.It Sy flushroutes
298.Sq YES
299or
300.Sq NO .
301Flushes the route table on networking startup.
302Useful when coming up to multiuser mode after going down to
303single-user mode.
304.It Sy dhclient
305.Sq YES
306or
307.Sq NO .
308Set to
309.Sq YES
310to configure some or all network interfaces using
311the DHCP client.
312If you set
313.Sy dhclient
314to
315.Sq YES ,
316you must either have
317.Pa /var
318in
319.Sy critical_filesystems_beforenet ,
320as part of
321.Pa / ,
322or direct the DHCP client to store the leases file on the root
323filesystem by modifying the
324.Sy dhclient_flags
325variable.
326You must not provide ifconfig information or ifaliases
327information for any interface that is to be configured using the DHCP client.
328Interface aliases can be set up in the DHCP client configuration
329file if needed - see
330.Xr dhclient.conf 5
331for details.
332.Pp
333Passes
334.Sy dhclient_flags
335to the DHCP client.
336See
337.Xr dhclient 8
338for complete documentation.
339If you wish to configure all broadcast
340network interfaces using the DHCP client, you can leave this blank.
341To configure only specific interfaces, name the interfaces to be configured
342on the command line.
343.Pp
344If you must run the DHCP client before mounting critical filesystems,
345then you should specify an alternate location for the DHCP client's lease
346file in the
347.Sy dhclient_flags
348variable - for example, "-lf /tmp/dhclient.leases".
349.It Sy ntpdate
350.Sq YES
351or
352.Sq NO .
353Runs
354.Xr ntpdate 8
355to set the system time from one of the hosts in
356.Sy ntpdate_hosts .
357If
358.Sy ntpdate_hosts
359is empty, it will attempt to find a list of hosts in
360.Pa /etc/ntp.conf .
361.It Sy ppp_peers
362If
363.Sy ppp_peers
364is not empty, then
365.Pa /etc/netstart
366will check each word in
367.Sy ppp_peers
368for a coresponding ppp configuration file in
369.Pa /etc/ppp/peers
370and will call
371.Xr pppd 8
372with the
373.Dq call Sy peer
374option.
375.It Sy ip6mode
376An IPv6 node can be a router
377.Pq nodes that forward packet for others
378or host
379.Pq nodes that do not forward .
380A host can be autoconfigured
381based on the information advertised by adjacent IPv6 router.
382By setting
383.Sy ip6mode
384to
385.Dq Li router ,
386.Dq Li host ,
387or
388.Dq Li autohost ,
389you can configure your node as a router,
390a non-autoconfigured host, or an autoconfigured host.
391Invalid values will be ignored, and the node will be configured as
392a non-autoconfigured host.
393You may want to check
394.Sy rtsol
395and
396.Sy rtsold
397as well, if you set the variable to
398.Dq Li autohost .
399.It Sy ip6sitelocal
400.Sq YES
401or
402.Sq NO .
403If you intend to use IPv6 site-local address in your site, set it to
404.Sq YES .
405Otherwise, reject route will get installed on boot to avoid misconfiguration
406regarding to site-local addresses.
407.It Sy rtsol
408.Sq YES
409or
410.Sq NO .
411Run
412.Xr rtsol 8 ,
413router solicitation command for IPv6 host.
414On nomadic host like notebook computers, you may want to enable
415.Sy rtsold
416as well.
417Passes
418.Sy rtsol_flags .
419This is only for autoconfigured IPv6 host, so set
420.Sy ip6mode
421to autohost if you use it.
422.El
423.Ss Daemons required by other daemons:
424.Bl -tag -width net_interfaces
425.It Sy inetd
426.Sq YES
427or
428.Sq NO .
429Runs the
430.Xr inetd 8
431daemon to start network server processes (as listed in
432.Pa /etc/inetd.conf )
433as necessary.
434Passes
435.Sy inetd_flags .
436The
437.Dq Li -l
438flag turns on libwrap connection logging.
439.It Sy rpcbind
440.Sq YES
441or
442.Sq NO .
443The
444.Xr rpcbind 8
445daemon is required for any
446.Xr rpc 3
447services.
448These include NFS,
449.Tn NIS ,
450.Xr bootparamd 8 ,
451.Xr rstatd 8 ,
452.Xr rusersd 8 ,
453and
454.Xr rwalld 8 .
455.El
456.Ss Commonly used daemons:
457.Bl -tag -width net_interfaces
458.It Sy syslogd
459.Sq YES
460or
461.Sq NO .
462Runs
463.Xr syslogd 8
464and passes
465.Sy syslogd_flags .
466.It Sy cron
467.Sq YES
468or
469.Sq NO .
470Run
471.Xr cron 8 .
472.It Sy named
473.Sq YES
474or
475.Sq NO .
476Runs
477.Xr named 8
478and passes
479.Sy named_flags .
480.It Sy timed
481.Sq YES
482or
483.Sq NO .
484Runs
485.Xr timed 8
486and passes
487.Sy timed_flags .
488The
489.Dq Li -M
490option allows
491.Xr timed 8
492to be a master time source as well as a slave.
493If you are also running
494.Xr ntpd 8 ,
495only one machine running both should have the
496.Dq Li -M
497flag given to
498.Xr timed 8 .
499.It Sy ntpd
500.Sq YES
501or
502.Sq NO .
503Runs
504.Xr ntpd 8
505and passes
506.Sy ntpd_flags .
507.It Sy sendmail
508.Sq YES
509or
510.Sq NO .
511Runs
512.Xr sendmail 8
513and passes
514.Sy sendmail_flags .
515.It Sy postfix
516.Sq YES
517or
518.Sq NO .
519Starts
520.Xr postfix 1
521mail system.
522.It Sy lpd
523.Sq YES
524or
525.Sq NO .
526Runs
527.Xr lpd 8
528and passes
529.Sy lpd_flags .
530The
531.Dq Li -l
532flag will turn on extra logging.
533.It Sy sshd
534.Sq YES
535or
536.Sq NO .
537Runs
538.Xr sshd 8
539and passes
540.Sy sshd_flags .
541.El
542.Ss Routing daemons:
543.Bl -tag -width net_interfaces
544.It Sy routed
545.Sq YES
546or
547.Sq NO .
548Runs
549.Xr routed 8 ,
550the RIP routing protocol daemon.
551Passes
552.Sy routed_flags .
553.\" This should be
554.\" .Sq NO
555.\" if
556.\" .Sy gated
557.\" is
558.\" .Sq YES .
559.It Sy mrouted
560.Sq YES
561or
562.Sq NO .
563Runs
564.Xr mrouted 8 ,
565the DVMRP multicast routing protocol daemon.
566Passes
567.Sy mrouted_flags .
568.It Sy route6d
569.Sq YES
570or
571.Sq NO .
572Runs
573.Xr route6d 8 ,
574the RIPng routing protocol daemon for IPv6.
575Passes
576.Sy route6d_flags .
577.It Sy rtsold
578.Sq YES
579or
580.Sq NO .
581Runs
582.Xr rtsold 8 ,
583the IPv6 router solicitation daemon.
584.Xr rtsold 8
585periodically transmits router solicitation packet
586to find IPv6 router on the network.
587This configuration is mainly for nomadic host like notebook computers.
588Stationary host should work fine with
589.Sy rtsol
590only.
591Passes
592.Sy rtsold_flags .
593This is only for autoconfigured IPv6 host, so set
594.Sy ip6mode
595to autohost if you use it.
596.El
597.Ss Daemons used to boot other hosts over a network:
598.Bl -tag -width net_interfaces
599.It Sy rarpd
600.Sq YES
601or
602.Sq NO .
603Runs
604.Xr rarpd 8 ,
605the reverse ARP daemon, often used to boot
606.Nx
607and Sun workstations.
608Passes
609.Sy rarpd_flags .
610.It Sy bootparamd
611.Sq YES
612or
613.Sq NO .
614Runs
615.Xr bootparamd 8 ,
616the boot parameter server, with
617.Sy bootparamd_flags
618as options.
619Used to boot
620.Nx
621and
622.Tn "SunOS 4.x"
623systems.
624.It Sy dhcpd
625.Sq YES
626or
627.Sq NO .
628Runs
629.Xr dhcpd 8 ,
630the Dynamic Host Configuration Protocol (DHCP) daemon,
631for assigning IP addresses to hosts and passing boot information.
632Passes
633.Sy dhcpd_flags .
634.It Sy dhcrelay
635.Sq YES
636or
637.Sq NO .
638Runs
639.Xr dhcrelay 8 .
640Passes
641.Sy dhcrelay_flags .
642.It Sy rbootd
643.Sq YES
644or
645.Sq NO .
646Runs
647.Xr rbootd 8 ,
648the
649.Tn HP
650boot protocol daemon; used for booting
651.Tn HP
652workstations.
653Passes
654.Sy rbootd_flags .
655.It Sy mopd
656.Sq YES
657or
658.Sq NO .
659Runs
660.Xr mopd 8 ,
661the
662.Tn DEC
663.Tn MOP
664protocol daemon; used for booting
665.Tn VAX
666and other
667.Tn DEC
668machines.
669Passes
670.Sy mopd_flags .
671.It Sy rtadvd
672.Sq YES
673or
674.Sq NO .
675Runs
676.Xr rtadvd 8 ,
677the IPv6 router advertisement daemon, which is used to advertise
678information about the subnet to IPv6 end hosts.
679Passes
680.Sy rtadvd_flags .
681This is only for IPv6 router, so set
682.Sy ip6forwarding
683to
684.Sq YES
685if you use it.
686.El
687.Ss X Window System daemons:
688.Bl -tag -width net_interfaces
689.It Sy xfs
690.Sq YES
691or
692.Sq NO .
693Runs the
694.Xr xfs 1
695X11 font server, which supplies local X font files to X terminals.
696.It Sy xdm
697.Sq YES
698or
699.Sq NO .
700Runs the
701.Xr xdm 1
702X display manager.
703These X daemons are available only with the optional X distribution of
704.Nx .
705.El
706.Ss NIS (YP) daemons:
707.Bl -tag -width net_interfaces
708.It Sy ypbind
709.Sq YES
710or
711.Sq NO .
712Runs
713.Xr ypbind 8 ,
714which lets
715.Tn NIS
716(YP) clients use information from a
717.Tn NIS
718server.
719Passes
720.Sy ypbind_flags .
721.It Sy ypserv
722.Sq YES
723or
724.Sq NO .
725Runs
726.Xr ypserv 8 ,
727the
728.Tn NIS
729(YP) server for distributing information from certain files in
730.Pa /etc .
731Passes
732.Sy ypserv_flags .
733The
734.Dq Li -d
735flag causes it to use DNS for lookups in
736.Pa /etc/hosts
737that fail.
738.It Sy yppasswdd
739.Sq YES
740or
741.Sq NO .
742Runs
743.Xr yppasswdd 8 ,
744which allows remote
745.Tn NIS
746users to update password on master server.
747Passes
748.Sy yppasswdd_flags .
749.El
750.Ss NFS daemons and parameters:
751.Bl -tag -width net_interfaces
752.It Sy mountd
753.Sq YES
754or
755.Sq NO .
756Runs
757.Xr mountd 8
758and passes
759.Sy mountd_flags .
760.It Sy nfs_client
761.Sq YES
762or
763.Sq NO .
764The number of local NFS asynchronous I/O server is now controlled via
765.Xr sysctl 8 .
766.It Sy nfs_server
767.Sq YES
768or
769.Sq NO .
770Sets up a host to be a NFS server by running
771.Xr nfsd 8
772and passing
773.Sy nfsd_flags .
774.It Sy lockd
775.Sq YES
776or
777.Sq NO .
778Runs
779.Xr rpc.lockd 8
780if either
781.Sy nfs_server
782or
783.Sy nfs_client
784is (or both are) set to
785.Sq YES .
786Passes
787.Sy lockd_flags .
788.It Sy statd
789.Sq YES
790or
791.Sq NO .
792Runs
793.Xr rpc.statd 8 ,
794a status monitoring daemon used when
795.Xr rpc.lockd 8
796is running, if either
797.Sy nfs_server
798or
799.Sy nfs_client
800is (or both are) set to
801.Sq YES .
802Passes
803.Sy statd_flags .
804.It Sy amd
805.Sq YES
806or
807.Sq NO .
808Runs
809.Xr amd 8 ,
810the automounter daemon, which automatically mounts NFS file systems
811whenever a file or directory within that filesystem is accessed.
812Passes
813.Sy amd_flags .
814.It Sy amd_dir
815The
816.Xr amd 8
817mount directory.
818Used only if
819.Sy amd
820is set to
821.Sq YES .
822.El
823.Ss Other daemons:
824.Bl -tag -width net_interfaces
825.It Sy rwhod
826.Sq YES
827or
828.Sq NO .
829Runs
830.Xr rwhod 8
831to support the
832.Xr rwho 1
833and
834.Xr ruptime 1
835commands.
836.It Sy kdc
837.Sq YES
838or
839.Sq NO .
840Runs the
841.Xr kdc 8
842Kerberos v4 and v5 server.
843This should be run on Kerberos master and slave servers.
844.El
845.Ss Hardware daemons:
846.Bl -tag -width net_interfaces
847.It Sy apmd
848.Sq YES
849or
850.Sq NO .
851Runs
852.Xr apmd 8
853and passes
854.Sy apmd_flags .
855.It Sy screenblank
856.Sq YES
857or
858.Sq NO .
859Runs
860.Xr screenblank 1
861and passes
862.Sy screenblank_flags .
863.It Sy wscons
864.Sq YES
865or
866.Sq NO .
867Configures the
868.Xr wscons 4
869console driver, from the configuration file
870.Pa /etc/wscons.conf .
871.El
872.Sh FILES
873.Bl -tag -width /etc/defaults/rc.conf -compact
874.It Pa /etc/rc.conf
875The file
876.Nm
877resides in
878.Pa /etc .
879.It Pa /etc/defaults/rc.conf
880Default settings for
881.Nm "" .
882.El
883.Sh SEE ALSO
884.Xr ifconfig.if 5 ,
885.Xr boot 8 ,
886.Xr rc 8 ,
887.Xr sysctl 8
888.Sh HISTORY
889The
890.Nm
891file appeared in
892.Nx 1.3 .
893