Supervising the Network

5-32
Customizing the User Environment
Login Script Commands and Variables
IF…THEN
Use IF…THEN when you want the login script to perform an action only
under certain conditions.
Command Format
IF conditional [AND|OR [conditional]] THEN
commands
[ELSE
command]
[END]
Replace conditional with identifier variables. For more information about
identifier variables, see “Identifier Variables” in this chapter.
Replace commands with any login script commands that you want to be
executed if the specified condition is true.
Using IF…THEN
Follow these guidelines for using IF...THEN:
Use IF…THEN statements to execute commands only under certain conditions.
An example of a conditional statement is
IF MEMBER OF “CLERKS”
In this statement, some action is performed if the user who logged in belongs to
the Group object named CLERKS.
The following is a different type of conditional statement:
IF DAY_OF_WEEK=“MONDAY”
In this statement, the equals sign (=) indicates the relationship between the
variable (DAY_OF_WEEK) and its value (Monday). Note that the value
(Monday) is inside quotation marks.
When using IF…THEN statements, be aware of the following syntax rules:
Use AND or OR to include two or more conditionals in an IF…THEN
statement.
Values of conditional statements must be enclosed in quotation marks.
The ELSE statement is optional.
IF, ELSE, and END must be on separate lines. THEN does not need to be on