The file /etc/init and /usr/sbin/init are
referred to synonymously as the initialization program that is run
when the OMVS address space is initialized.
The /usr/sbin/init program
invokes a shell to execute an initialization shell script that customizes
the environment. When this shell script finishes or when a time interval
established by /usr/sbin/init expires,
kernel services become available for general batch and interactive
use. Standard output (stdout) and standard error output (stderr) are
redirected to /etc/log.
Table 1 lists the files that are
associated with
/usr/sbin/init.
Table 1. Files that are associated with /usr/sbin/initFile |
What it is |
---|
/bin/sh |
The default shell that /usr/sbin/init invokes
to execute /etc/rc or
another shell script that is specified in the /etc/init.options file. |
/etc/init.options |
The customized initialization options file,
which is read by /usr/sbin/init. |
/etc/rc |
The default shell script that is used for initialization. |
/etc/log |
The file that output is written to. |
Other utilities |
Services that are called by the initialization
shell script. |
/usr/sbin/init and
the customized /etc/init.options and /etc/rc are
run at IPL. There is no other way to invoke them explicitly.
Before /usr/sbin/init invokes
the shell to execute the system initialization shell script, it reads
the file /etc/init.options for
values of various options. The IBM-supplied default is in /samples/init.options. Copy this file to /etc/init.options and
make the appropriate changes. If you already have /etc/init.options,
then compare it to /samples/init.options and
retrofit any new updates.
/usr/sbin/init treats
all lines in
/etc/init.options that
do not start with a hyphen (-) as comment lines. Lines that start
with a hyphen are used to specify options. The format of lines specifying
options is as follows:
-oo vvvvv comment
where:
- oo is a field of one or more nonblank characters
immediately following the hyphen that identifies the option. The
end of the option field is delimited by one or more blanks.
- vvvvv is a field of one or more nonblank characters
that specify an option value. These characters are numeric, alphabetic,
or a combination of both, depending on the option being specified.
The end of the value field is delimited by one or more blanks.
Option
and option value characters must appear in columns 1 through 79 of
an option line in /etc/init.options.
/usr/sbin/init ignores
characters beyond column 79. However, a backslash (\) immediately
following nonblank value field characters is recognized as a continuation
character. If the continuation character is found, nonblank characters
at the beginning of the next line are treated as option value characters.
The first blank character delimits the end of the value field.
Option
value characters on a continuation line are limited to columns 1 through
79.
The continuation character is recognized on continuation
lines as well as the option line.
- Any characters after a blank delimiting the end of the option
value field on the same line are treated as comment characters.
Options and option value ranges are listed as follows:
- -a nnnn
- Alarm option. Specifies the maximum time in seconds allowed for
the shell script to complete. You must specify enough time for the
system initialization script to complete if this is a requirement
at your installation.
The default is 180 seconds.
The maximum
is 9999 seconds.
If the shell does not signal completion of
the script before this time elapses, /usr/sbin/init writes
the timeout error message, FSUM4013I, in /etc/log and
exits.
If the value 0 is specified, no timeout
interval is set. The decision to specify the value 0 for
the alarm option should be made carefully and only after you know
that the initialization script is error-free.
- -t n
- Terminate option. Specifies whether to end the shell script initialization
if the timeout specified by the alarm option (-a)
occurs.
- 0
- Allows the shell script to continue
- >0
- Ends the shell script
- 1
- The default; ends the shell script.
If you specify terminate and the timeout waiting
for the initialization shell script occurs, /usr/sbin/init sends
a stop signal to the shell process group.
It is your responsibility
to decide if the initialization shell script can continue concurrently
with batch and interactive use of the shell.
- -e string
- Environment variable option: string in the
form name=value specifies the environment variable
name and the value that /usr/sbin/init passes
to the shell that it is invoking
The maximum length is 255 characters.
/etc/init.options can
contain up to 25 -e option lines specifying names
and values for different environment variables. /usr/sbin/init passes
the resultant environment variable array to the shell that it invokes.
In turn, the shell uses this array to set up an execution environment
for the initialization shell script that is appropriate for the installation.
TZ is an example of an environment variable that should be considered.
These
environment variables should also be set up in /etc/profile or $HOME/.profile for
each interactive user. Examples of variables that you could specify
are TZ, LANG, and NLSPATH.
- -sc pathname
- The path name of the initialization shell script.
The default
is /etc/rc.
The maximum length is 255 characters.
- -sh pathname
- pathname specifies the shell to be invoked
by /usr/sbin/init to
run the initialization script. /usr/sbin/init cannot
set environment variables for the rest of the system.
The default
is /bin/sh.
The maximum length is 255 characters.
-sh <blanks>
tells /usr/sbin/init not
to run the shell. Instead, /usr/sbin/init signals
that multiuser mode is to be entered and then exits.
Following is a sample /etc/init.options file
showing the time zone, the Japanese language, and the locale:
-e TZ=JST-9
-e LANG=Ja_JP
-e NLSPATH=/usr/lib/nls/msg/%L/%N
/etc/init opens the message catalog fsumucat.cat in
directory /usr/lib/nls/msg/C unless an NLSPATH
environment variable naming a different directory is specified in
the /etc/init.options file.
For more information about national language support, see Customizing for your national code page in the shell.
Tip: You can use a REXX exec in an MVS™ data
set as an alternative to running the /etc/init initialization
program. To activate the REXX exec for initialization, you must specify
its name on the STARTUP_EXEC statement in the BPXPRMxx parmlib member.