DISPLAY TTY DEFINITIONS

ITEM: RTA000042304



QUESTION:                                                                       
Recently I have done many AIX V3.1.5 to V3.2.5 upgrades. One of my              
biggest problems is redefiniting ttys and printers (by the way, I               
DON'T do preservation install). My quick solution has been writing down         
the tty and printer defintions on a piece of paper after looking into           
SMIT data. This method is NOT too useful when I have over 100 ttys to           
redefinite. Is there any easier way (using commands) to display 1.              
the terminal tty definition and 2. both physical and Virtual printer            
definition ?                                                                    
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A:    The easiest method to migrate your tty's and printers when                
   performing an upgrade from AIX 3.1.5 to AIX 3.2.5                            
   is to use the migration utilities on AIXTOOLS with a                         
   preservation install. Corrections have been made to                         
   previous utilities to make the migration of tty's and                        
   printers work correctly.  If your concern with doing a                       
   preservation install is from using previous utilities, the                   
   new utilities make this migration work correctly.                            
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
QUESTION:                                                                       
I know the preservation upgrade will back up my tty and printer                 
definitions, but I would rather do a complete overwrite installation.           
If the preservation installation can pull the tty and printer                   
definitions from somewhere, I am sure it can be done. Except                    
I can't find the command for it. Can you find it ? I need the command           
that will display the details on all ttys and printers.                         
                                                                                
---------- ---------- ---------- --------- ---------- ----------               
A: You are correct in saying that it can be done but it's not just one          
   command.  The first response was the "easiest" method, what follows          
   is the "other" method you are looking for:                                   
                                                                                
              HOW TO MOVE AN OLD 3.1 ODM DEVICE CONFIGURATION                   
                    DATABASE TO A NEW AIX 3.2 SYSTEM:                           
The install scripts use an undocumented program                                 
called /usr/lpp/bosinst/rda.  If you grep for rda in /usr/lpp/bosinst           
you will find 6 instances of its use.  It could be adapted for use              
outside of the preservation install process.  Basically what rda does           
is compare an old ODM to the current one and create a shell script              
which is a bunch of mkdev and chdev commands to create the devices.             
  Following is the USAGE info for rda:                                          
 rda .-a attr_file_name..-c prefix..-d dvc_file_name..-p object path. \         
     .-s scriptname ..-eRrx.                                                   
   where                                                                        
   -a : specify name of output attribute stanza file;                           
        default is "/etc/objrepos/old_ca_stanzas".                              
   -c : prefix to search for in the old CuDv;                                   
        default is "'*'".                                                       
   -d : specify name of output device stanza file;                              
        default is "/etc/objrepos/old_cd_stanzas".                              
   -p : specify directory pathname containing the old object classes;           
        default is "/etc/objrepos".                                             
   -e : only extract from the old database and do not recover device or         
        configuration information and do not execute the recovery script.       
   -R : Relax the criteria for determining which device to configure.  If       
        this flag is set, the location code will not be checked.                
   -r : only recover device and configuration information from the stanza       
        files.  Do not extract information from the old database and           
        do not execute the recovery script.                                     
   -s : name of shell script file to use for preserving data.                   
   -x : Only execute the script containing recovery config methods.             
---------- ---------- ---------- --------- ---------- ----------                
A: Once you have booted the 3.2 system with a minimal configuration,            
   restore the ODM customized device configuration files from your previ-       
   ous 3.1 system into a temporary directory ( I use /tmp/odmold in this        
   example). Place the following files in this directory:                       
      CuAt                                                                      
      CuDep                                                                     
      CuDvDr                                                                    
      CuDv                                                                      
   Now, execute the following commands to compare the old ODM files             
   with your current device configuration and recreate the necessary            
   devices and reapply the necessary attributes:                               
   (You can execute the following text as a shell script)                       
------------------------ BEGIN TEXT ------------------------------              
     # Save current ODM database                                                
     rm -rf /tmp/odm.bk                                                         
     mkdir /tmp/odm.bk                                                          
     cp /etc/objrepos/C* /tmp/odm.bk                                            
     # Get config stanzas from current database                                 
     /usr/lpp/bosinst/rda -e -p /tmp/odmold -d /tmp/odmold/CuDv.sav \           
         -a /tmp/odmold/CuAt.sav                                                
     # Generate and execute new device config routines.                         
     # Run twice to ensure all parent devices are configured before the         
     # attempt to configure child devices.                                      
     /usr/lpp/bosinst/rda -R -d /tmp/odmold/CuDv.sav \                          
         -a /tmp/odmold/CuAt.sav -s /tmp/reconfig1                              
     /usr/lpp/bosinst/rda -R -d /tmp/odmold/CuDv.sav \                         
         -a /tmp/odmold/CuAt.sav -s /tmp/reconfig2                              
     # Shutdown and reboot                                                      
     shutdown -Fr                                                               
----------------------------END TEXT-------------------------------             
   Note that error messages which occur during the last two "rda" runs          
   may usually be ignored, as the system is trying to configure                 
   devices whose parent device or adapter does not exist.                       
   If you then look at the files /tmp/reconfig1 and /tmp/reconfig2,             
   you will see all of the configuration commands used to create                
   and change the customized devices.                                           
   Note that this process must only be used for adding customized               
   data to a currently uncustomized base operating system. This process         
   was attempted many times using a customized set of ODM files and each        
   time the system was unable to reboot properly afterwards.                    
   Just make sure you do this procedure immediately after the overwrite        
   install firstboot and you shouldn't have a problem.                          
                                                                                
   The above procedure takes care of all of odm, which will cover the           
   tty devices but if you don't use the migration utilities you will            
   not get the printer queues or virtual printers unless you also copy          
   the following files:                                                         
                                                                                
   On the 3.1 system, the /usr/lpd/pio/custom files should be copied to         
   the /var/spool/lpd/pio/custom directory on the 3.2 system.  This             
   gets the virtual printer and queue device for each queue.                    
   Then copy the /etc/qconfig file from the 3.1 system to the 3.2 system.       
   This gets the printer queue configurations.                                  
                                                                                
   If you want a hardcopy of all the ODM entries you can do an odmget           
   on each of the /etc/objrepos/Cu* files and redirect that to a text          
   file for printing.  If you want to limit the output to only tty and          
   printer information, you will need to develop the applicable search          
   criteria to use with the -q flag of the odmget command.  You can find        
   this information for the odmget command in InfoExplorer.                     
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
                                                                                
                                                                                
This item was created from library item Q659103      CRKGP                      
                                                                                
Additional search words:                                                        
ASYNC CRKGP DEFINITIONS DEVICE DISPLAY DSPLY HARDWARE IX MAY94 OZNEW            
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000042304 ITEM: RTA000042304
Dated: 06/1996 Category: RISCADEV
This HTML file was generated 99/06/24~12:43:17
Comments or suggestions? Contact us