HP-UX Secure Resource Partitions (SRP) A.02.01 Administrator's Guide

70
12 Starting and Stopping SRP Compartments
This chapter describes how to start and stop SRP compartments. For complete syntax information, see
srp(1M).
This chapter addresses the following topics:
12.1 SRP Startup and Shutdown Processing
12.2 Starting an SRP Compartment
12.3 Stopping an SRP Compartment
12.1 SRP Startup and Shutdown Processing
By default, all SRP compartments are automatically started at system startup time and are
automatically stopped at system shutdown time. Each SRP home directory contains an sbin
subdirectory (/var/hpsrp/compartment_name/sbin) that contains a subtree similar to the
system /sbin subtree. Each sbin directory contains an init.d directory and an rcN.d
subdirectory tree with the subdirectories rc0.d, rc1.d, rc2.d, rc3.d, and rc4.d.
The SRP product also includes the /opt/hpsrp/bin/util/srp_rc script. This is a sequencer
script that is executed at system startup and shutdown time and is similar to the /sbin/rc utility, (see
rc(1M)), with the following differences:
The /opt/hpsrp/bin/util/srp_rc script first restarts itself in the target compartment by
executing the following command:
privrun -c compartment_name /opt/hpsrp/bin/util/srp_rc
This causes all the processes and scripts executed by srp_rc to run in the target SRP
compartment.
The srp_rc script executes the files in the
/var/hpsrp/compartment_name/sbin/init.d/rcN.d directories (instead of the files
in the /sbin/init.d/rcN.d directories).
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.
NOTE: The numeric portion of the subdirectory name does not correspond to the system run
level at which the scripts are executed. The system run level at which the scripts are executed
is determined by the run level at which the SRP master script, /sbin/init.d/srp, runs (run
level 3 when the system starts up and at run level 2 when the system shuts down).
At system startup or shutdown time, the SRP scripts are executed as follows:
The /sbin/init.d/srp file is linked to the following files:
/sbin/rc3.d/S999srp
/sbin/rc2.d/K001srp