Content-type: text/html
/usr/sbin/rcmgr set variable value
/usr/sbin/rcmgr get variable
The rcmgr command retrieves and sets run-time configuration variables stored in /etc/rc.config and /etc/rc.config.site. These variables are used to configure various subsystems (for example, NFS or NTP) by scripts in the /sbin/init.d directory.
The get option allows a programmer to specify a default value for an option if it is not found in either the /etc/rc.config or the /etc/rc.config.local files.
rcmgr set HOSTNAME yukio This example sets the variable HOSTNAME to yukio in the /etc/rc.config file. rcmgr set IFCONFIG_0 111.111.1.11 netmask 255.255.252.0 This example sets the variable IFCONFIG_0 to "111.111.1.11 netmask 255.255.252.0" in the /etc/rc.config file. rcmgr get NIS_ARGS This example displays the value the variable NIS_ARGS. If this variable is not set in the /etc/rc.config file, then the rcmgr command looks in the /etc/rc.config.site file for the variable.
Startup scripts can use the get operation to provide values to variables as in the following examples: host=`rcmgr get HOSTNAME` This example sets the value of host to the value of HOSTNAME in the /etc/rc.config file. num_nfsd=`rcmgr get NUM_NFSD 4` This example sets num_nfsd to 4 if NUM_NFSD does not exist in the /etc/rc.config file or in the /etc/rc.config.site file.
/etc/rc.config
/etc/rc.config.site
System Administration delim off