HP-UX Secure Resource Partitions (SRP) A.02.02 Administrator's Guide
74
• The /sbin/rc3.d/S999srp file is the last or one of the last startup scripts executed when
the transitions from run level 2 to run level 3 (typically at system startup). The
/sbin/rc2.d/K001srp file is the first or one of the first shutdown scripts executed when
the system transitions from run level 3 to run level 2 (typically at system shutdown). The SRP
initialization and shutdown scripts are processed as follows:
• The /sbin/init.d/srp script reads the /etc/rc.config.d/srpconf file to determine
which SRP compartments have the autostart feature enabled.
• The /sbin/init.d/srp script executes the /opt/hpsrp/bin/util/srp_rc script for
each compartment that has the autostart feature enabled.
• The /opt/hpsrp/bin/util/srp_rc script executes the scripts in the rcN.d directories in
alphabetical order. When the system starts up, SRP traverses these directories in ascending
order and executes scripts in these directories. When the system shuts down, SRP traverses
these directories in descending order and executes scripts in these directories.
The files in the /var/hpsrp/srp_name/sbin/rcN.d directories are also executed when the
srp -start or the srp -stop command is executed for the compartment.
14.2 Starting an SRP Compartment
Use the following command to start an SRP compartment:
srp -sta[rt] srp_name
Where:
srp_name
Specifies the name of an SRP compartment.
The srp -start command starts an SRP compartment by executing the
/opt/hpsrp/bin/srp_rc script with the compartment name and start argument:
• The srp_rc script runs a customizable prestart script, /var/hpsrp/srp_name.setup/setup.
The script is run in the INIT compartment, with the following command line:
/var/hpsrp/srp_name.setup/setup start srp_name /var/hpsrp/srp_name
• The srp_rc script runs each of the start scripts in the run-level directories of the SRP,
/var/hpsrp/srp_name/sbin/init.d/rcN.d. The start scripts are files with
names that start with an S. Each script is run in the compartment of the SRP that has the
start paramenter.
14.3 Stopping an SRP Compartment
Use the following command to stop an SRP compartment:
srp -sto[p] srp_name
Where:
srp_name
Specifies the name of an SRP compartment.
The srp -stop command shuts down an SRP compartment by executing the
/sbin/init.d/srp_rc script with the compartment name and the stop argument:
• The srp_rc script executes the shutdown scripts in the /var/hpsrp/srp_name/rcN.d
directories. The shutdown scripts are files with names that start with a K. The scripts are run
in the compartment of the SRP that has the start paramenter.