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