IBM Support

AIX SMIT: How to remove a duplicate SMIT Menu Option

How To


Summary

How to identify, and remove a duplicate SMIT menu option

Objective

SMIT menu options are added to the ODM by products, during installation. Sometimes, update errors can cause ODM corruption. The menus might have missing, or duplicate stanzas.

The following is an example of a duplicate stanza in the SMIT mlang menu.

image 11720

The following steps demonstrate how to remove a duplicate entry for the AIX "Manage Language Environment" menu.

Steps

1) Run smitty in debug to get the ODM information:

# smitty -l smitty.debug -D mlang
2) Examine the smitty.debug file:

Find the menu screen, and duplicate entries:

Menu screen information:
(Menu screen selected as FastPath,
        id          = "system",
        id_seq_num  = "052",
        next_id     = "mlang",
        title       = "Manage Language Environment".)
    Object class: sm_menu_opt,
        id   = "system", id_seq_num = "052", next_id = "mlang",
        text = "Manage Language Environment"
(Menu screen selected,
        FastPath    = "mlang",
        id_seq_num  = "052",
        next_id     = "mlang",
        title       = "Manage Language Environment".)
ODM Object class information:
    Object class: sm_menu_opt,
        id   = "mlang", id_seq_num = "030", next_id = "mle_rm_lang_hdr",
        text = "Remove Language Environments"
    Object class: sm_menu_opt,
        id   = "mlang", id_seq_num = "030", next_id = "mle_rm_lang_hdr",
        text = "Remove Language Environments"

The following information will be used to retrieve and the duplicate stanzas:

Object class=sm_menu_opt
id=mlang 
id_seq_num="030"
3) Verify ODM path and files:

Default smitty uses /usr/lib/objrepos ODMDIR. However, you can verify the ODM files with a simple truss:

# truss -t kopen -feado /tmp/truss.out smitty mlang

5636210: 9175255: 0.1485: kopen("/usr/lib/objrepos/sm_cmd_opt", O_RDWR) = 14

4) Extract the duplicate ODM stanzas:

# odmget -q 'id=mlang AND id_seq_num="030"' sm_menu_opt > sm_cmd_opt.dupe
(OR by text string)
# odmget -q 'id=mlang AND text = "Remove Language Environments"' sm_menu_opt > sm_cmd_opt.dupe
5) Back up the ODM:

# cd /; tar -cvf /tmp/all_odm_files.tar ./etc/objrepos ./usr/lib/objrepos ./usr/share/lib/objrepos
6) Delete both entries:
 
# odmdelete -o sm_menu_opt  -q 'id=mlang AND id_seq_num="030"'
0518-307 odmdelete: 2 objects deleted.
7) Test menu list (should not contain the options):

# smitty mlang
--> "Remove Language Environments" is no longer listed.
8) Prepare the data to be added back to sm_cmd_opt:

# cp sm_cmd_opt.dupe sm_cmd_opt.add
# vi sm_cmd_opt.add
Remove the second entry.
The single entry should have the following format:
sm_menu_opt:
        id_seq_num = "030"
        id = "mlang"
        next_id = "mle_rm_lang_hdr"
        text = "Remove Language Environments"
        text_msg_file = "smit.cat"
        text_msg_set = 53
        text_msg_id = 22
        next_type = "d"
        alias = ""
        help_msg_id = "2850302"
        help_msg_loc = ""
        help_msg_base = ""
        help_msg_book = ""
9) Add the single entry to ODM:

# odmadd sm_cmd_opt.add
 
10) Test menu list (Should correctly list the option):

# smitty mlang
-->  "Remove Language Environments" is correctly listed once.
11) Reset the ODMDIR Path variable to default:

# IMPORTANT!!!
# export ODMDIR=/etc/objrepos

Additional Information

SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For more information, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For more information, see: Working with IBM AIX Support: Collecting snap data

[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cw2pAAA","label":"Desktop->SMIT"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions"}]

Document Information

Modified date:
12 October 2021

UID

ibm16498139