[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

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.

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.

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.

Note: 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

Chapter 25, System Management Interface Tool (SMIT)

SMIT Screen Types , SMIT Object Classes , SMIT Information Command Descriptors) , and SMIT Command Generation and Execution

Adding Tasks to the SMIT Database , Debugging SMIT Database Extensions , Creating SMIT Help Information for a New Task

Chapter 17, Object Data Manager (ODM)

odmadd command, smit command

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]