The /etc/rc file contains commands that the filer executes at boot time to configure the filer.
Startup commands are placed into the /etc/rc file automatically after you run the setup command or the Setup Wizard.
Commands in the /etc/rc file configure the filer to do the following actions:
To understand the commands used in the /etc/rc file on the root volume, examine the following sample /etc/rc file, which contains default startup commands:
#Auto-generated /etc/rc Tue May 30 14:51:36 PST 2000
hostname toaster
ifconfig e0 `hostname`-0
ifconfig e1 `hostname`-1
ifconfig f0 `hostname`-f0
ifconfig a5 `hostname`-a5
route add default MyRouterBox
routed on
timezone US/Pacific
savecore
exportfs -a
nfs on
This section explains the sample /etc/rc file:
hostname toaster
Sets the filer host name to "toaster."
ifconfig e0 `hostname`-0
ifconfig e1 `hostname`-1
ifconfig f0 `hostname`-f0
ifconfig a5 `hostname`-a5
Sets the IP address for the filer network interfaces with a default network mask.
The arguments in single backquotes expand to "toaster" if you specify "toaster" as the host name during setup. The actual IP addresses are obtained from the /etc/hosts file on the filer root volume. If you prefer to have the actual IP addresses in the /etc/rc file, you can enter IP addresses directly in /etc/rc on the root volume. For more information about the ifconfig command, see the Network Management Guide.
route add default MyRouterBox
Specifies the default router. You can add route commands to /etc/rc on the root volume to set static routes for the filer. The network address for MyRouterBox must be in /etc/hosts on the root volume.
routed on
Starts the routing daemon. For more information about routing, see the Network Management Guide.
timezone US/Pacific
Sets the time zone. The argument to the timezone command specifies which file in the /etc/zoneinfo directory on the root volume describes the time zone you want.
savecore
Saves the core file from a system panic, if any, in the /etc/crash directory on the root volume. Core files are created only during the first boot after a system panic.
exportfs -a
Exports all directories specified in the /etc/exports file on the root volume. This command is included only if the filer runs NFS.
Caution
Avoid running exportfs -a at a time when applications are likely to be accessing any file system listed in the etc/exports file. Because the exportfs -a operation momentarily unexports and then re-exports all the listed file systems, any application attempt to access a temporarily unexported file can result in serious application error.
nfs on
Turns on NFS file service. By default, this command is included even if NFS is not licensed for your filer. When the filer runs this command from the /etc/rc file on the root volume on a filer without an NFS license, the command fails and the following messages appear:
NFS service is not licensed.
(Use the "license" command to license it.)
NFS server is NOT running.
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00472
File: admin19.htm
Last updated: 11/17/03 16:57:06