xref: /netbsd-src/share/man/man5/rc.conf.5 (revision 220b5c059a84c51ea44107ea8951a57ffaecdc8c)
1.\"	$NetBSD: rc.conf.5,v 1.49 2001/09/08 01:29:07 wiz 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.It Sy newsyslog
197.Sq YES
198or
199.Sq NO .
200Run
201.Nm newsyslog
202to trim logfiles before syslogd starts.  Intended for laptop users.
203.El
204.Ss System security setting
205.Bl -tag -width net_interfaces
206.It Sy securelevel
207A number.
208The system securelevel is set to the specified value early
209in the boot process, before any external logins, or other programs
210that run users job, are started.
211If set to nothing, the default action is taken, as described in
212.Xr init 8 ,
213which contains definitive information about the system securelevel.
214.El
215.Ss Networking startup
216.Bl -tag -width net_interfaces
217.It Sy ipfilter
218.Sq YES
219or
220.Sq NO .
221Runs
222.Xr ipf 8
223to load in packet filter specifications from
224.Pa /etc/ipf.conf
225at network boot time, before any interfaces are configured.
226See
227.Xr ipf.conf 5 .
228.It Sy ipnat
229Runs
230.Xr ipnat 8
231to load in the IP network address translation (NAT) rules from
232.Pa /etc/ipnat.conf
233at network boot time, before any interfaces are configured.
234See
235.Xr ipnat.conf 5 .
236.It Sy ipsec
237.Sq YES
238or
239.Sq NO .
240Runs
241.Xr setkey 8
242to load in IPsec manual keys and policies from
243.Pa /etc/ipsec.conf
244at network boot time, before any interfaces are configured.
245.It Sy ipmon
246.Sq YES
247or
248.Sq NO .
249Runs
250.Xr ipmon 8
251to read
252.Xr ipf 8
253packet log information and log it to a file or the system log.
254Passes
255.Sy ipmon_flags .
256.It Sy auto_ifconfig
257.Sq YES
258or
259.Sq NO .
260Sets the
261.Sy net_interfaces
262variable (see below) to the output of
263.Xr ifconfig 8
264with the
265.Dq Li -l
266flag and suppresses warnings about interfaces in this list that
267do not have an ifconfig file or variable.
268.It Sy net_interfaces
269The list of network interfaces to be configured at boot time.
270For each interface "xxN", the system first looks for ifconfig
271parameters in
272.Pa /etc/ifconfig.xxN
273and then in the variable
274.Sy ifconfig_xxN .
275The contents of the file or the variable are handed to ifconfig
276after the interface name.
277If
278.Sy auto_ifconfig
279is set to "NO" and neither the file nor the variable is found,
280a warning is printed.
281Refer to
282.Xr ifconfig.if 5
283for more details on
284.Pa /etc/ifconfig.xxN .
285.It Sy ifaliases_*
286List of
287.Sq Em "address netmask"
288pairs to configure additional network addresses for the given
289configured interface
290.Dq *
291(e.g.
292.Sy ifaliases_le0 ) .
293If
294.Em netmask
295is
296.Dq - ,
297then use the default netmask for the interface.
298.Pp
299.Sy ifaliases_*
300covers limited cases only and considered unrecommended.
301We recommend using
302.Pa /etc/ifconfig.xxN
303with multiple lines instead.
304.It Sy flushroutes
305.Sq YES
306or
307.Sq NO .
308Flushes the route table on networking startup.
309Useful when coming up to multiuser mode after going down to
310single-user mode.
311.It Sy dhclient
312.Sq YES
313or
314.Sq NO .
315Set to
316.Sq YES
317to configure some or all network interfaces using
318the DHCP client.
319If you set
320.Sy dhclient
321to
322.Sq YES ,
323you must either have
324.Pa /var
325in
326.Sy critical_filesystems_beforenet ,
327as part of
328.Pa / ,
329or direct the DHCP client to store the leases file on the root
330filesystem by modifying the
331.Sy dhclient_flags
332variable.
333You must not provide ifconfig information or ifaliases
334information for any interface that is to be configured using the DHCP client.
335Interface aliases can be set up in the DHCP client configuration
336file if needed - see
337.Xr dhclient.conf 5
338for details.
339.Pp
340Passes
341.Sy dhclient_flags
342to the DHCP client.
343See
344.Xr dhclient 8
345for complete documentation.
346If you wish to configure all broadcast
347network interfaces using the DHCP client, you can leave this blank.
348To configure only specific interfaces, name the interfaces to be configured
349on the command line.
350.Pp
351If you must run the DHCP client before mounting critical filesystems,
352then you should specify an alternate location for the DHCP client's lease
353file in the
354.Sy dhclient_flags
355variable - for example, "-lf /tmp/dhclient.leases".
356.It Sy ntpdate
357.Sq YES
358or
359.Sq NO .
360Runs
361.Xr ntpdate 8
362to set the system time from one of the hosts in
363.Sy ntpdate_hosts .
364If
365.Sy ntpdate_hosts
366is empty, it will attempt to find a list of hosts in
367.Pa /etc/ntp.conf .
368.It Sy ppp_peers
369If
370.Sy ppp_peers
371is not empty, then
372.Pa /etc/netstart
373will check each word in
374.Sy ppp_peers
375for a coresponding ppp configuration file in
376.Pa /etc/ppp/peers
377and will call
378.Xr pppd 8
379with the
380.Dq call Sy peer
381option.
382.It Sy ip6mode
383An IPv6 node can be a router
384.Pq nodes that forward packet for others
385or host
386.Pq nodes that do not forward .
387A host can be autoconfigured
388based on the information advertised by adjacent IPv6 router.
389By setting
390.Sy ip6mode
391to
392.Dq Li router ,
393.Dq Li host ,
394or
395.Dq Li autohost ,
396you can configure your node as a router,
397a non-autoconfigured host, or an autoconfigured host.
398Invalid values will be ignored, and the node will be configured as
399a non-autoconfigured host.
400You may want to check
401.Sy rtsol
402and
403.Sy rtsold
404as well, if you set the variable to
405.Dq Li autohost .
406.It Sy ip6sitelocal
407.Sq YES
408or
409.Sq NO .
410If you intend to use IPv6 site-local address in your site, set it to
411.Sq YES .
412Otherwise, reject route will get installed on boot to avoid misconfiguration
413regarding to site-local addresses.
414.It Sy rtsol
415.Sq YES
416or
417.Sq NO .
418Run
419.Xr rtsol 8 ,
420router solicitation command for IPv6 host.
421On nomadic host like notebook computers, you may want to enable
422.Sy rtsold
423as well.
424Passes
425.Sy rtsol_flags .
426This is only for autoconfigured IPv6 host, so set
427.Sy ip6mode
428to autohost if you use it.
429.El
430.Ss Daemons required by other daemons
431.Bl -tag -width net_interfaces
432.It Sy inetd
433.Sq YES
434or
435.Sq NO .
436Runs the
437.Xr inetd 8
438daemon to start network server processes (as listed in
439.Pa /etc/inetd.conf )
440as necessary.
441Passes
442.Sy inetd_flags .
443The
444.Dq Li -l
445flag turns on libwrap connection logging.
446.It Sy rpcbind
447.Sq YES
448or
449.Sq NO .
450The
451.Xr rpcbind 8
452daemon is required for any
453.Xr rpc 3
454services.
455These include NFS,
456.Tn NIS ,
457.Xr bootparamd 8 ,
458.Xr rstatd 8 ,
459.Xr rusersd 8 ,
460and
461.Xr rwalld 8 .
462.El
463.Ss Commonly used daemons
464.Bl -tag -width net_interfaces
465.It Sy syslogd
466.Sq YES
467or
468.Sq NO .
469Runs
470.Xr syslogd 8
471and passes
472.Sy syslogd_flags .
473.It Sy cron
474.Sq YES
475or
476.Sq NO .
477Run
478.Xr cron 8 .
479.It Sy named
480.Sq YES
481or
482.Sq NO .
483Runs
484.Xr named 8
485and passes
486.Sy named_flags .
487.It Sy timed
488.Sq YES
489or
490.Sq NO .
491Runs
492.Xr timed 8
493and passes
494.Sy timed_flags .
495The
496.Dq Li -M
497option allows
498.Xr timed 8
499to be a master time source as well as a slave.
500If you are also running
501.Xr ntpd 8 ,
502only one machine running both should have the
503.Dq Li -M
504flag given to
505.Xr timed 8 .
506.It Sy ntpd
507.Sq YES
508or
509.Sq NO .
510Runs
511.Xr ntpd 8
512and passes
513.Sy ntpd_flags .
514.It Sy sendmail
515.Sq YES
516or
517.Sq NO .
518Runs
519.Xr sendmail 8
520and passes
521.Sy sendmail_flags .
522.It Sy postfix
523.Sq YES
524or
525.Sq NO .
526Starts
527.Xr postfix 1
528mail system.
529.It Sy lpd
530.Sq YES
531or
532.Sq NO .
533Runs
534.Xr lpd 8
535and passes
536.Sy lpd_flags .
537The
538.Dq Li -l
539flag will turn on extra logging.
540.It Sy sshd
541.Sq YES
542or
543.Sq NO .
544Runs
545.Xr sshd 8
546and passes
547.Sy sshd_flags .
548.El
549.Ss Routing daemons
550.Bl -tag -width net_interfaces
551.It Sy routed
552.Sq YES
553or
554.Sq NO .
555Runs
556.Xr routed 8 ,
557the RIP routing protocol daemon.
558Passes
559.Sy routed_flags .
560.\" This should be
561.\" .Sq NO
562.\" if
563.\" .Sy gated
564.\" is
565.\" .Sq YES .
566.It Sy mrouted
567.Sq YES
568or
569.Sq NO .
570Runs
571.Xr mrouted 8 ,
572the DVMRP multicast routing protocol daemon.
573Passes
574.Sy mrouted_flags .
575.It Sy route6d
576.Sq YES
577or
578.Sq NO .
579Runs
580.Xr route6d 8 ,
581the RIPng routing protocol daemon for IPv6.
582Passes
583.Sy route6d_flags .
584.It Sy rtsold
585.Sq YES
586or
587.Sq NO .
588Runs
589.Xr rtsold 8 ,
590the IPv6 router solicitation daemon.
591.Xr rtsold 8
592periodically transmits router solicitation packet
593to find IPv6 router on the network.
594This configuration is mainly for nomadic host like notebook computers.
595Stationary host should work fine with
596.Sy rtsol
597only.
598Passes
599.Sy rtsold_flags .
600This is only for autoconfigured IPv6 host, so set
601.Sy ip6mode
602to autohost if you use it.
603.El
604.Ss Daemons used to boot other hosts over a network
605.Bl -tag -width net_interfaces
606.It Sy rarpd
607.Sq YES
608or
609.Sq NO .
610Runs
611.Xr rarpd 8 ,
612the reverse ARP daemon, often used to boot
613.Nx
614and Sun workstations.
615Passes
616.Sy rarpd_flags .
617.It Sy bootparamd
618.Sq YES
619or
620.Sq NO .
621Runs
622.Xr bootparamd 8 ,
623the boot parameter server, with
624.Sy bootparamd_flags
625as options.
626Used to boot
627.Nx
628and
629.Tn "SunOS 4.x"
630systems.
631.It Sy dhcpd
632.Sq YES
633or
634.Sq NO .
635Runs
636.Xr dhcpd 8 ,
637the Dynamic Host Configuration Protocol (DHCP) daemon,
638for assigning IP addresses to hosts and passing boot information.
639Passes
640.Sy dhcpd_flags .
641.It Sy dhcrelay
642.Sq YES
643or
644.Sq NO .
645Runs
646.Xr dhcrelay 8 .
647Passes
648.Sy dhcrelay_flags .
649.It Sy rbootd
650.Sq YES
651or
652.Sq NO .
653Runs
654.Xr rbootd 8 ,
655the
656.Tn HP
657boot protocol daemon; used for booting
658.Tn HP
659workstations.
660Passes
661.Sy rbootd_flags .
662.It Sy mopd
663.Sq YES
664or
665.Sq NO .
666Runs
667.Xr mopd 8 ,
668the
669.Tn DEC
670.Tn MOP
671protocol daemon; used for booting
672.Tn VAX
673and other
674.Tn DEC
675machines.
676Passes
677.Sy mopd_flags .
678.It Sy rtadvd
679.Sq YES
680or
681.Sq NO .
682Runs
683.Xr rtadvd 8 ,
684the IPv6 router advertisement daemon, which is used to advertise
685information about the subnet to IPv6 end hosts.
686Passes
687.Sy rtadvd_flags .
688This is only for IPv6 router, so set
689.Sy ip6forwarding
690to
691.Sq YES
692if you use it.
693.El
694.Ss X Window System daemons
695.Bl -tag -width net_interfaces
696.It Sy xfs
697.Sq YES
698or
699.Sq NO .
700Runs the
701.Xr xfs 1
702X11 font server, which supplies local X font files to X terminals.
703.It Sy xdm
704.Sq YES
705or
706.Sq NO .
707Runs the
708.Xr xdm 1
709X display manager.
710These X daemons are available only with the optional X distribution of
711.Nx .
712.El
713.Ss NIS (YP) daemons
714.Bl -tag -width net_interfaces
715.It Sy ypbind
716.Sq YES
717or
718.Sq NO .
719Runs
720.Xr ypbind 8 ,
721which lets
722.Tn NIS
723(YP) clients use information from a
724.Tn NIS
725server.
726Passes
727.Sy ypbind_flags .
728.It Sy ypserv
729.Sq YES
730or
731.Sq NO .
732Runs
733.Xr ypserv 8 ,
734the
735.Tn NIS
736(YP) server for distributing information from certain files in
737.Pa /etc .
738Passes
739.Sy ypserv_flags .
740The
741.Dq Li -d
742flag causes it to use DNS for lookups in
743.Pa /etc/hosts
744that fail.
745.It Sy yppasswdd
746.Sq YES
747or
748.Sq NO .
749Runs
750.Xr yppasswdd 8 ,
751which allows remote
752.Tn NIS
753users to update password on master server.
754Passes
755.Sy yppasswdd_flags .
756.El
757.Ss NFS daemons and parameters
758.Bl -tag -width net_interfaces
759.It Sy mountd
760.Sq YES
761or
762.Sq NO .
763Runs
764.Xr mountd 8
765and passes
766.Sy mountd_flags .
767.It Sy nfs_client
768.Sq YES
769or
770.Sq NO .
771The number of local NFS asynchronous I/O server is now controlled via
772.Xr sysctl 8 .
773.It Sy nfs_server
774.Sq YES
775or
776.Sq NO .
777Sets up a host to be a NFS server by running
778.Xr nfsd 8
779and passing
780.Sy nfsd_flags .
781.It Sy lockd
782.Sq YES
783or
784.Sq NO .
785Runs
786.Xr rpc.lockd 8
787if either
788.Sy nfs_server
789or
790.Sy nfs_client
791is (or both are) set to
792.Sq YES .
793Passes
794.Sy lockd_flags .
795.It Sy statd
796.Sq YES
797or
798.Sq NO .
799Runs
800.Xr rpc.statd 8 ,
801a status monitoring daemon used when
802.Xr rpc.lockd 8
803is running, if either
804.Sy nfs_server
805or
806.Sy nfs_client
807is (or both are) set to
808.Sq YES .
809Passes
810.Sy statd_flags .
811.It Sy amd
812.Sq YES
813or
814.Sq NO .
815Runs
816.Xr amd 8 ,
817the automounter daemon, which automatically mounts NFS file systems
818whenever a file or directory within that filesystem is accessed.
819Passes
820.Sy amd_flags .
821.It Sy amd_dir
822The
823.Xr amd 8
824mount directory.
825Used only if
826.Sy amd
827is set to
828.Sq YES .
829.El
830.Ss Other daemons
831.Bl -tag -width net_interfaces
832.It Sy rwhod
833.Sq YES
834or
835.Sq NO .
836Runs
837.Xr rwhod 8
838to support the
839.Xr rwho 1
840and
841.Xr ruptime 1
842commands.
843.It Sy kdc
844.Sq YES
845or
846.Sq NO .
847Runs the
848.Xr kdc 8
849Kerberos v4 and v5 server.
850This should be run on Kerberos master and slave servers.
851.El
852.Ss Hardware daemons
853.Bl -tag -width net_interfaces
854.It Sy apmd
855.Sq YES
856or
857.Sq NO .
858Runs
859.Xr apmd 8
860and passes
861.Sy apmd_flags .
862.It Sy screenblank
863.Sq YES
864or
865.Sq NO .
866Runs
867.Xr screenblank 1
868and passes
869.Sy screenblank_flags .
870.It Sy wscons
871.Sq YES
872or
873.Sq NO .
874Configures the
875.Xr wscons 4
876console driver, from the configuration file
877.Pa /etc/wscons.conf .
878.El
879.Sh FILES
880.Bl -tag -width /etc/defaults/rc.conf -compact
881.It Pa /etc/rc.conf
882The file
883.Nm
884resides in
885.Pa /etc .
886.It Pa /etc/defaults/rc.conf
887Default settings for
888.Nm "" .
889.El
890.Sh SEE ALSO
891.Xr ifconfig.if 5 ,
892.Xr boot 8 ,
893.Xr rc 8 ,
894.Xr sysctl 8
895.Sh HISTORY
896The
897.Nm
898file appeared in
899.Nx 1.3 .
900