RC.CONF(5) NetBSD Programmer's Manual RC.CONF(5)
NAME
rc.conf - system startup configuration file
DESCRIPTION
The rc.conf file specifies which services are enabled during system startup by the startup scripts invoked by /etc/rc (see rc(8)), and the shutdown scripts invoked by /etc/rc.shutdown. The rc.conf file is a shell script that is sourced by rc(8), meaning that rc.conf must contain valid shell commands. Listed below are the standard rc.conf 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. Most variables are one of two types: enabling variables or flags variables. Enabling variables, such as inetd, are generally named after the program or the system they enable, and are set to `YES' or `NO'. Flags variables, such as inetd_flags have the same name with "_flags" appended, and determine what arguments are passed to the program if it is enabled. If a variable that rc(8) expects to be set is not set, or the value is not one of the allowed values, a warning will be printed. By default, rc.conf reads /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 rc.conf. rc.d(8) scripts that use load_rc_config from rc.subr(8) also support sourcing an optional end-user provided per-script override file /etc/rc.conf.d/service, (where service is the contents of the name variable in the rc.d(8) script). This may contain variable overrides, including allowing the end-user to override various run_rc_command rc.d(8) control variables, and thus changing the operation of the script without requiring editing of the script. Overall control rc_configured `YES' or `NO'. If not set to `YES' then the system will drop into single-user mode during boot. rc_fast_and_loose If set to a non-empty string, each script in /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 fork(2) operation. Note: Use this at your own risk! A rogue command or script may inadvertently prevent boot to multiuser. rc_rcorder_flags A string. Extra arguments to the rcorder(8) run by /etc/rc. do_rcshutdown `YES' or `NO'. If set to `NO', shutdown(8) will not run /etc/rc.shutdown. rcshutdown_rcorder_flags A string. Extra arguments to the rcorder(8) run by /etc/rc.shutdown. rcshutdown_timeout A number. If non-blank, use this as the number of seconds to run a watchdog timer for which will terminate /etc/rc.shutdown if the timer expires before the shutdown script completes. Basic network configuration hostname A string. Name of host. If empty or not set, then the contents of /etc/myname (if it exists) are used. defaultroute A string. Default network route. If empty or not set, then the contents of /etc/mygate (if it exists) are used. domainname A string. NIS (YP) domain of host. If empty or not set, then the contents of /etc/defaultdomain (if it exists) are used. Boottime file-system and swap configuration critical_filesystems_local A string. File systems mounted very early in the system boot before networking services are available. Usually /var is part of this, because it is needed by services such as dhclient(8) which may be required to get the network operational. critical_filesystems_remote A string. File systems such as /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. fsck_flags A string. A file system is checked with fsck(8) during boot before mounting it. This option may be used to override the default command-line options passed to the fsck(8) program. When set to -y, 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. no_swap `YES' or `NO'. Set the no_swap variable to `YES' if you have configured your system with no swap on purpose. If not set to `YES', and no swap devices are configured, the system will warn you. swapoff `YES' or `NO'. Remove block-type swap devices at shutdown time. Useful if swapping onto RAIDframe devices. One-time actions to perform or programs to run on lkm `YES' or `NO'. Runs /etc/rc.lkm. savecore `YES' or `NO'. Runs the savecore(8) utility. Passes savecore_flags. clear_tmp `YES' or `NO'. Clear /tmp after reboot. update_motd `YES' or `NO'. Updates the NetBSD version string in the /etc/motd file to reflect the version of the running kernel. See motd(5). dmesg `YES' or `NO'. Create /var/run/dmesg.boot from the output of dmesg(8). Passes dmesg_flags. accounting `YES' or `NO'. Enables process accounting with accton(8). Requires /var/account/acct to exist. newsyslog `YES' or `NO'. Run newsyslog to trim logfiles before syslogd starts. Intended for laptop users. Passes newsyslog_flags. System security setting 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 init(8), which contains definitive information about the system securelevel. Note that setting securelevel to 0 in rc.conf will actually result in the system booting with securelevel set to 1, as init(8) will raise the level when rc(8) completes. Networking startup ipfilter `YES' or `NO'. Runs ipf(8) to load in packet filter specifications from /etc/ipf.conf at network boot time, before any interfaces are configured. See ipf.conf(5). ipnat `YES' or `NO'. Runs ipnat(8) to load in the IP network address translation (NAT) rules from /etc/ipnat.conf at network boot time, before any interfaces are configured. See ipnat.conf(5). ipfs `YES' or `NO'. Runs ipfs(8) to save and restore information for ipnat and ipfilter state tables. The information is stored in /var/db/ipf/ipstate.ipf and /var/db/ipf/ipnat.ipf. Passes ipfs_flags. ipsec `YES' or `NO'. Runs setkey(8) to load in IPsec manual keys and policies from /etc/ipsec.conf at network boot time, before any interfaces are configured. ipmon `YES' or `NO'. Runs ipmon(8) to read ipf(8) packet log information and log it to a file or the system log. Passes ipmon_flags. racoon `YES' or `NO'. Runs racoon(8), the IKE (ISAKMP/Oakley) key management daemon. auto_ifconfig `YES' or `NO'. Sets the net_interfaces variable (see below) to the output of ifconfig(8) with the ``-l'' flag and suppresses warnings about interfaces in this list that do not have an ifconfig file or variable. 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 /etc/ifconfig.xxN and then in the variable ifconfig_xxN. The contents of the file or the variable are handed to ifconfig after the interface name. If auto_ifconfig is set to "NO" and neither the file nor the variable is found, a warning is printed. Refer to ifconfig.if(5) for more details on /etc/ifconfig.xxN. ifaliases_* A string. List of `address netmask' pairs to configure additional network addresses for the given configured interface ``*'' (e.g. ifaliases_le0). If netmask is ``-'', then use the default netmask for the interface. ifaliases_* covers limited cases only and considered unrecommended. We recommend using /etc/ifconfig.xxN with multiple lines instead. flushroutes `YES' or `NO'. Flushes the route table on networking startup. Useful when coming up to multiuser mode after going down to single-user mode. dhclient `YES' or `NO'. Set to `YES' to configure some or all network interfaces using the DHCP client. If you set dhclient to `YES', you must either have /var in critical_filesystems_local, as part of /, or direct the DHCP client to store the leases file on the root file system by modifying the dhclient_flags variable. 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 dhclient.conf(5) for details. Passes dhclient_flags to the DHCP client. See 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. If you must run the DHCP client before mounting critical filesystems, then you should specify an alternate location for the DHCP client's lease file in the dhclient_flags variable - for example, "-lf /tmp/dhclient.leases". ntpdate `YES' or `NO'. Runs ntpdate(8) to set the system time from one of the hosts in ntpdate_hosts. If ntpdate_hosts is empty, it will attempt to find a list of hosts in /etc/ntp.conf. Passes ntpdate_flags. ppp_peers A string. If ppp_peers is not empty, then /etc/rc.d/ppp will check each word in ppp_peers for a corresponding ppp configuration file in /etc/ppp/peers and will call pppd(8) with the ``call peer'' option. ip6mode A string. An IPv6 node can be a router (nodes that forward packet for others) or a host (nodes that do not forward). A host can be autoconfigured based on the information advertised by adjacent IPv6 routers. By setting ip6mode to ``router'', ``host'', or ``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 rtsol and rtsold as well, if you set the variable to ``autohost''. ip6sitelocal `YES' or `NO'. If you intend to use IPv6 site-local addresses in your site, set it to `YES'. Otherwise, reject routes will get installed on boot to avoid misconfiguration relating to site-local addresses. rtsol `YES' or `NO'. Run rtsol(8), router solicitation command for IPv6 hosts. On nomadic hosts like notebook computers, you may want to enable rtsold as well. Passes rtsol_flags. This is only for autoconfigured IPv6 hosts, so set ip6mode to ``autohost'' if you use it. ifwatchd `YES' or `NO'. Monitor dynamic interfaces and perform actions upon address changes. Passes ifwatchd_flags. altqd `YES' or `NO'. ALTQ configuration/monitoring daemon. Passes altqd_flags. Daemons required by other daemons inetd `YES' or `NO'. Runs the inetd(8) daemon to start network server processes (as listed in /etc/inetd.conf) as necessary. Passes inetd_flags. The ``-l'' flag turns on libwrap connection logging. rpcbind `YES' or `NO'. The rpcbind(8) daemon is required for any rpc(3) services. These include NFS, NIS, bootparamd(8), rstatd(8), rusersd(8), and rwalld(8). Passes rpcbind_flags. Commonly used daemons syslogd `YES' or `NO'. Runs syslogd(8) and passes syslogd_flags. cron `YES' or `NO'. Run cron(8). named `YES' or `NO'. Runs named(8) and passes named_flags. named_chrootdir A string. If non-blank and named is `YES', run named(8) as the unprivileged user and group `named', chroot(2)ed to named_chrootdir. named_chrootdir/var/run/log will be added to the list of log sockets that syslogd(8) listens to. timed `YES' or `NO'. Runs timed(8) and passes timed_flags. The ``-M'' option allows timed(8) to be a master time source as well as a slave. If you are also running ntpd(8), only one machine running both should have the ``-M'' flag given to timed(8). ntpd `YES' or `NO'. Runs ntpd(8) and passes ntpd_flags. ntpd_chrootdir A string. If non-blank and ntpd is `YES', run ntpd(8) as the unprivileged user and group `ntpd', chroot(2)ed to ntpd_chrootdir. ntpd_chrootdir/var/run/log will be added to the list of log sockets that syslogd(8) listens to. This option requires that the kernel has pseudo-device clockctl compiled in, and that /dev/clockctl is present. sendmail `YES' or `NO'. Runs sendmail(8) and passes sendmail_flags. postfix `YES' or `NO'. Starts postfix(1) mail system. lpd `YES' or `NO'. Runs lpd(8) and passes lpd_flags. The ``-l'' flag will turn on extra logging. sshd `YES' or `NO'. Runs sshd(8) and passes sshd_flags. Routing daemons routed `YES' or `NO'. Runs routed(8), the RIP routing protocol daemon. Passes routed_flags. mrouted `YES' or `NO'. Runs mrouted(8), the DVMRP multicast routing protocol daemon. Passes mrouted_flags. route6d `YES' or `NO'. Runs route6d(8), the RIPng routing protocol daemon for IPv6. Passes route6d_flags. rtsold `YES' or `NO'. Runs rtsold(8), the IPv6 router solicitation daemon. 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 rtsol. Passes rtsold_flags. This is only for autoconfigured IPv6 hosts, so set ip6mode to ``autohost'' if you use it. Daemons used to boot other hosts over a network rarpd `YES' or `NO'. Runs rarpd(8), the reverse ARP daemon, often used to boot NetBSD and Sun workstations. Passes rarpd_flags. bootparamd `YES' or `NO'. Runs bootparamd(8), the boot parameter server, with bootparamd_flags as options. Used to boot NetBSD and SunOS 4.x systems. dhcpd `YES' or `NO'. Runs dhcpd(8), the Dynamic Host Configuration Protocol (DHCP) daemon, for assigning IP addresses to hosts and passing boot information. Passes dhcpd_flags. dhcrelay `YES' or `NO'. Runs dhcrelay(8). Passes dhcrelay_flags. rbootd `YES' or `NO'. Runs rbootd(8), the HP boot protocol daemon; used for booting HP workstations. Passes rbootd_flags. mopd `YES' or `NO'. Runs mopd(8), the DEC MOP protocol daemon; used for booting VAX and other DEC machines. Passes mopd_flags. ndbootd `YES' or `NO'. Runs ndbootd(8), the Sun Network Disk (ND) Protocol server. Passes ndbootd_flags. rtadvd `YES' or `NO'. Runs rtadvd(8), the IPv6 router advertisement daemon, which is used to advertise information about the subnet to IPv6 end hosts. Passes rtadvd_flags. This is only for IPv6 routers, so set ip6mode to ``router'' if you use it. X Window System daemons xfs `YES' or `NO'. Runs the xfs(1) X11 font server, which supplies local X font files to X terminals. xdm `YES' or `NO'. Runs the xdm(1) X display manager. These X daemons are available only with the optional X distribution of NetBSD. NIS (YP) daemons ypbind `YES' or `NO'. Runs ypbind(8), which lets NIS (YP) clients use information from a NIS server. Passes ypbind_flags. ypserv `YES' or `NO'. Runs ypserv(8), the NIS (YP) server for distributing information from certain files in /etc. Passes ypserv_flags. The ``-d'' flag causes it to use DNS for lookups in /etc/hosts that fail. yppasswdd `YES' or `NO'. Runs yppasswdd(8), which allows remote NIS users to update password on master server. Passes yppasswdd_flags. NFS daemons and parameters mountd `YES' or `NO'. Runs mountd(8) and passes mountd_flags. nfs_client `YES' or `NO'. The number of local NFS asynchronous I/O server is now controlled via sysctl(8). nfs_server `YES' or `NO'. Sets up a host to be a NFS server by running nfsd(8) and passing nfsd_flags. lockd `YES' or `NO'. Runs rpc.lockd(8) if nfs_server and/or nfs_client are set to `YES'. Passes lockd_flags. statd `YES' or `NO'. Runs rpc.statd(8), a status monitoring daemon used when rpc.lockd(8) is running, if nfs_server and/or nfs_client are set to `YES'. Passes statd_flags. amd `YES' or `NO'. Runs amd(8), the automounter daemon, which automatically mounts NFS file systems whenever a file or directory within that file system is accessed. Passes amd_flags. amd_dir A string. The amd(8) mount directory. Used only if amd is set to `YES'. Other daemons kdc `YES' or `NO'. Runs the kdc(8) Kerberos v4 and v5 server. This should be run on Kerberos master and slave servers. isdnd `YES' or `NO'. Runs isdnd(8), the isdn4bsd ISDN connection management daemon. Passes isdnd_flags. isdn_autoupdown `YES' or `NO'. Set all configured ISDN interfaces to ``up''. If isdn_interfaces is not blank, only the listed interfaces will be modified. Used only if isdnd is set to `YES'. rwhod `YES' or `NO'. Runs rwhod(8) to support the rwho(1) and ruptime(1) commands. Hardware daemons apmd `YES' or `NO'. Runs apmd(8) and passes apmd_flags. poffd `YES' or `NO'. Runs poffd(8) x68k shutdown daemon (only for NetBSD/x86k). Passes poffd_flags. screenblank `YES' or `NO'. Runs screenblank(1) and passes screenblank_flags. moused `YES' or `NO'. Runs moused(8), to pass serial mouse data to the wscons mouse mux. Passes moused_flags. wscons `YES' or `NO'. Configures the wscons(4) console driver, from the configuration file /etc/wscons.conf.
FILES
/etc/rc.conf The file rc.conf resides in /etc. /etc/defaults/rc.conf Default settings for rc.conf, sourced by rc.conf before the end-user configuration section. /etc/rc.conf.d/foo foo-specific rc.conf overrides.
SEE ALSO
ifconfig.if(5), boot(8), rc(8), sysctl(8)
HISTORY
The rc.conf file appeared in NetBSD 1.3. NetBSD 1.6.2 June 17, 2002 8
Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.