[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

SMIT Aliases and Fast Paths

A System Management Interface Tool (SMIT) sm_menu_opt object can be used to define a fast path that, when entered with the smit command to start SMIT, can get a user directly to a specific menu, selector, or dialog; the alias itself is never displayed. Use of a fast path allows a user to bypass the main SMIT menu and other objects in the SMIT interface path to that menu, selector, or dialog. Any number of fast paths can point to the same menu, selector, or dialog.

An sm_menu_opt object is used to define a fast path by setting the sm_menu_opt.alias field to "y" . In this case, the sm_menu_opt object is used exclusively to define a fast path. The new fast path or alias name is specified by the value in the sm_menu_opt.id field. The contents of the sm_menu_opt.next_id field points to another menu object, selector header object, or dialog header object, depending on whether the value of the sm_menu_opt.next_type field is "m" (menu), "n" (selector), or "d" (dialog).

Every non alias sm_menu_opt object for a menu title (next_type="m" ) should have a unique sm_menu_opt.next_id field value, since this field is automatically used as a fast path.

The figure shows an alias pointing to a menu object that points to another menu. In the figure:

If you want two menu items to point to the same successor menu, one of the next_id fields should point to an alias, which in turn points to the successor menu.

The figure shows how two menu selections can point to a common menu. In the figure:

The figure shows an alias (an sm_menu_opt object) that points to the header of a selector (an sm_name_hdr object):

The figure shows an alias (an sm_menu_opt object) that points to the header of a dialog (an sm_cmd_hdr object):

You build aliases and fast paths by defining them in a stanza file and then processing the file with the odmadd command. Several menus, selectors, and dialogs can be defined in a single file. The odmadd command adds each alias definition to the specified object repository. The /usr/lib/objrepos directory is the default object repository for system information and can be used to store your compiled objects. At SMIT run time, the objects are automatically retrieved from a SMIT database.

Attention: You should always back up the /usr/lib/objrepos directory before deleting or adding any objects or object classes. Unanticipated damage to objects or classes needed for system operations can cause system problems.

Related Information

System Management Interface Tool (SMIT) Overview for Programmers.

For more information about programming SMIT, see Understanding SMIT Screen Types, Understanding SMIT Object Classes, Understanding SMIT Information Command Descriptors, and Understanding SMIT Command Generation and Execution.

Adding Tasks to the SMIT Database, Debugging SMIT Database Extensions, Creating SMIT Help Information for a NewTask.

For information about programming with ODM, see Object Data Manager (ODM) Overview for Programmers.

The odmadd command, smit command.


[ Previous | Next | Contents | Glossary | Home | Search ]