Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving and restoring TTY settings 1

Status
Not open for further replies.

aixadmin

Technical User
Sep 8, 2000
3
AU
We are doing a new install of AIX 4.3.3 onto our system. I need to know what commands I can write into a script file to save and restore the exsisting tty settings to floppy disk. If I can do this it will save alot of setup time reconfiguring all the tty settings.
 
There is a "How To" on doing this on IBM's website,

The "How to" describes how to restore from a mksysb tape
or from a sysback tape.

If you make a backup of your ODM to another directory, you can accomplish the same thing...

Here are the commands and sequence:

# First get a dump of all your current TTY Config information, do this prior to the upgrade or sysback or mksysb re-installation.

export ODMDIR=/etc/objrepos

odmget -q "name like cxma*" CuDv >>odm.out
odmget -q "name like cxma*" CuAt >>odm.out
odmget -q "name like sa*" CuAt >>odm.out
odmget -q "name like sa*" CuDv >>odm.out
odmget -q "name like tty*" CuAt >>odm.out
odmget -q "name like tty*" CuDv >>odm.out
odmget -q "name like lp*" CuAt >>odm.out
odmget -q "name like lp*" CuDv >>odm.out

#This gets the attributes of LP and TTY devices and dumps it to the file named odm.out (This is specific to the IBM 128 Port Adapter, as noted by the cxma device type)

# You may choose to also make a backup of /etc/objrepos at this point, either to a file, a seperate directory, or to a removeable media.


#Once you have upgraded your system, and have discovered at your TTY definitions did not make it through the upgrade or recovery..... Delete the TTY definitions that you do have, then add the definitions back from the odm.out file created above:


odmdelete -o CuAt -q "name like cxma*"
odmdelete -o CuDv -q "name like cxma*"
odmdelete -o CuAt -q "name like sa*"
odmdelete -o CuDv -q "name like sa*"
odmdelete -o CuAt -q "name like tty*"
odmdelete -o CuDv -q "name like tty*"
odmdelete -o CuDvDr -q "value3 like tty*"
odmdelete -o CuAt -q "name like lp*"
odmdelete -o CuDv -q "name like lp*"
odmdelete -o CuDvDr -q "value3 like lp*"
odmdelete -o CuAt -q "name like cxma*"
odmdelete -o CuDv -q "name like cxma*"

# Add The saved or exported definitions:
odmadd odm.out

# Execute the following and reboot:
savebase
sync;sync;
shutdown -F

This should give you the steps necessary (excluding the backing up of the /etc/objrepos directory) necessary to restore the TTY definitions.

You might also want to execute a mksysb or a sysback before performing these ODM operations, especially the odmdelete and odmadd commands.

It is also good practice to execute these ODM operations in another directory. Let's say you copied the /etc/objrepos to /tmp/etc/objrepos. You can set your ODMDIR variable to /tmp/etc/objrepos and perform the operations there, then copy them into /etc/objrepos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top