HP-UX HB v13.00 Ch-03 - System Startup

HP-UX Handbook Rev 13.00 Page 6 (of 14)
Chapter 03 System Startup
October 29, 2013
scripts must be written to be read by the POSIX shell, and not the Bourne shell, ksh, or csh. In
some cases, these files must also be read and possibly modified by Software Distributor control
scripts or SAM. See sd(4) and sam(1M). For this reason, each variable definition must appear on
a separate line, with the syntax:
variable=value
No trailing comments may appear on a variable definition line. Comment statements must be on
separate lines, with the # comment character in column one. This example shows the required
syntax for configuration files:
# Cron configuration. See cron(1M)
# CRON: Set to 1 to start cron daemon
#
CRON=1
Configuration variables may be declared as array parameters when describing multiple instances
of the variable configuration. For example, a system may contain two network interfaces, each
having a unique IP address and subnet mask (see ifconfig(1M)). An example of such a
declaration is as follows:
INTERFACE_NAME[0]=”lan1”
IP_ADDRESS[0]=”15.1.55.2”
SUBNET_MASK[0]=”255.255.248.0”
INTERFACE_NAME[1]=”lan3”
IP_ADDRESS[1]=”15.1.55.3”
SUBNET_MASK[1]=”255.255.248.0”
Note that there must be no requirements on the order of the files sourced. This means
configuration files must not refer to variables defined in other configuration files, since there is
no guarantee that the variable being referenced is currently defined. There is no protection
against environment variable namespace collision in these configuration files. Programmers must
take care to avoid such problems.
It’s highly recommended that the name of a configuration file is the same as the name of the
appropriate Execution Script at /sbin/init.d/.
/etc/TIMEZONE
The file /etc/TIMEZONE contains the definition of the TZ environment variable. This file is
required by POSIX. It is sourced by /sbin/rc at the same time the /etc/rc.config.d/* files
are sourced.
# cat /etc/TIMEZONE
TZ=MET-1METDST
export TZ