The following files are included in this document and should be separated:
/etc/objrepos/PdAt /etc/objrepos/PdCn /etc/objrepos/PdDv
##################################################### The "modem 28" script configures IBM or MegaHertz PCMCIA cards. It installs and configures the necessary drivers and creates an entry in ODM. Date Written 3-13-96 IBM PC Company HelpCenter 3039 Cornwallis Road RTP, NC 27709 #####################################################To be able to run this script:
mkdir -p /tmp/modem
chmod 744 modem28
PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "bus_io_addr" deflt = "0x3f8" values = "0x2f8,0x3f8,0x2e8,0x3e8" width = "0x08" type = "O" generic = "D" rep = "nl" nls_index = 3 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "modem_type" deflt = "1" values = "1" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "bus_intr_lvl" deflt = "9" values = "5,7,9,11" width = ""
type = "I" generic = "D" rep = "nl" nls_index = 5 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "intr_priority" deflt = "2" values = "1,2" width = "" type = "P" generic = "D" rep = "nl" nls_index = 6 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "frequency" deflt = "115200" values = "115200" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "driver" deflt = "pcrsdd" values = "pcrsdd" width = ""
type = "R" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pcmcia_devid" deflt = "2002,0xa4003900" values = "" width = "" type = "R" generic = "" rep = "s" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_att" deflt = "0x00600000" values = "0x00600000" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_itime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "pm_dev_stime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "load_module" deflt = "/usr/lib/methods/isaload"
values = "/usr/lib/methods/isaload" width = "" type = "E" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "rtrig" deflt = "3" values = "0-3,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 11 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "tbc16" deflt = "16" values = "1-16,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 10 PdAt: uniquetype = "adapter/pcmcia/a4003900" attribute = "speed" deflt = "9600" values = "0,50,75,110,134,150,200,300,600,1200,1800,2400,4800,9600,19200,38400" width = "" type = "E" generic = "DU" rep = "slm" nls_index = 12 PdCn: uniquetype = "adapter/pcmcia/a4003900" connkey = "rs232" connwhere = "s" PdDv: type = "a4003900" class = "adapter" subclass = "pcmcia" prefix = "sa" devid = "" base = 0 has_vpd = 0 detectable = 1 chgstatus = 0 bus_ext = 0 fru = 2 led = 2086 setno = 151 msgno = 2 catalog = "devices.cat" DvDr = "pcmcia/pcrsdd" Define = "/usr/lib/methods/define_rspc" Configure = "/usr/lib/methods/cfgpcasync" Change = "/usr/lib/methods/chggen_rspc"
Unconfigure = "/usr/lib/methods/ucfgpcasync" Undefine = "/usr/lib/methods/undefine" Start = "" Stop = "" inventory_only = 0 uniquetype = "adapter/pcmcia/a4003900"
PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "bus_io_addr" deflt = "0x3f8" values = "0x2f8,0x3f8,0x2e8,0x3e8" width = "0x08" type = "O" generic = "D" rep = "nl" nls_index = 3 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "modem_type" deflt = "1" values = "1" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "bus_intr_lvl" deflt = "9" values = "5,7,9,11" width = "" type = "I" generic = "D" rep = "nl" nls_index = 5 PdAt: uniquetype = "adapter/pcmcia/02010000"
attribute = "intr_priority" deflt = "2" values = "1,2" width = "" type = "P" generic = "D" rep = "nl" nls_index = 6 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "frequency" deflt = "115200" values = "115200" width = "" type = "R" generic = "" rep = "nl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "driver" deflt = "pcrsdd" values = "pcrsdd" width = "" type = "R" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pcmcia_devid" deflt = "2002,0x02010000" values = "" width = "" type = "R" generic = "" rep = "s" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pm_dev_att" deflt = "0x00600000" values = "0x00600000" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "pm_dev_itime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000"
attribute = "pm_dev_stime" deflt = "0" values = "0" width = "" type = "R" generic = "" rep = "n" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "load_module" deflt = "/usr/lib/methods/isaload" values = "/usr/lib/methods/isaload" width = "" type = "E" generic = "" rep = "sl" nls_index = 0 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "rtrig" deflt = "3" values = "0-3,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 11 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "tbc16" deflt = "16" values = "1-16,1" width = "" type = "E" generic = "DU" rep = "nr" nls_index = 10 PdAt: uniquetype = "adapter/pcmcia/02010000" attribute = "speed" deflt = "9600" values = "0,50,75,110,134,150,200,300,600,1200,1800,2400,4800,9600,19200,38400" width = "" type = "E" generic = "DU" rep = "slm" nls_index = 12 PdCn: uniquetype = "adapter/pcmcia/02010000" connkey = "rs232"
connwhere = "s" PdDv: type = "02010000" class = "adapter" subclass = "pcmcia" prefix = "sa" devid = "" base = 0 has_vpd = 0 detectable = 1 chgstatus = 0 bus_ext = 0 fru = 2 led = 2086 setno = 151 msgno = 2 catalog = "devices.cat" DvDr = "pcmcia/pcrsdd" Define = "/usr/lib/methods/define_rspc" Configure = "/usr/lib/methods/cfgpcasync" Change = "/usr/lib/methods/chggen_rspc" Unconfigure = "/usr/lib/methods/ucfgpcasync" Undefine = "/usr/lib/methods/undefine" Start = "" Stop = "" inventory_only = 0 uniquetype = "adapter/pcmcia/02010000"
#!/usr/bin/ksh # ########################################################### # This script configures an IBM or MegaHertz PCMCIA card. # Also, this script is specific to ONLY 28.8 Data/Fax cards. # The reason for this is that each PCMCIA card is hardwired with # a unique Manufacturer ID. This script, for the most part, # would install (if it is already not installed) the device driver # from the AIX 4.1.4 CD. It then attemps to configure the # PCMCIA card. ############################################################# ############################################################# # Requirement to run this script: # 1) HAVE AIX 4.1.4 CD-ROM # 2) HAVE THE ROOT PRIVILEGES # 3) Have either IBM or MegaHertz PC card ############################################################# ############################################################# # Script courtesy of the PC Company HelpCenter, RTP, NC # Script Created: March 13, 1996
#############################################################
USER= whoami
OS= oslevel
ODMSUCCESSFUL=FALSE
if [ "$USER" != "root" ] || [ "$OS" != "4.1.4.0" ]
then
clear
echo 'Cannot run this script!!'
echo "Either you are NOT logged in as root OR"
echo "You are at an earlier level of AIX then 4.1.4"
echo "Exiting..."
exit 1
fi
/usr/bin/clear
function header {
echo " ========================================= "
echo " | IBM PC COMPANY HELPCENTER |"
echo " | This script configures an UNSUPPORTED |"
echo " | IBM PCMCIA 28.8(V.34)/14.4 Kbs |"
echo " | Data/FAX Modem |"
echo " | Part Number: 25H6420 |"
echo " | OR |"
echo " | MegaHertz 28.8/14.4kbps Data/Fax |"
echo " | on AIX 4.1.4.0 |"
echo " ========================================= "
}; header
echo "+======================================================+"
echo "Please use this script with the following understanding:"
echo "IBM WILL NOT BE RESPONSIBLE FOR DAMAGES OF ANY KIND"
echo "RESULTING FROM ITS USE. THE USE OF THIS INFORMATION"
echo "IS THE SOLE RESPONSIBILITY OF THE CUSTOMER AND DEPENDS"
echo "ON THE CUSTOMER'S ABILITY TO EVALUATE AND INTEGRATE"
echo "THIS SCRIPT INTO THE CUSTOMER'S OPERATIONAL ENVIRONMENT"
echo ""
echo "===================================================="
echo "This script has been tested with ONLY IBM & Megahertz"
echo "28.8 PCMCIA cards. During the test, configuration of"
echo "The above PC cards were successful. This, however, doesn't"
echo "imply any implicit or explicit guarantee that the cards"
echo "would configure in all the possible environments."
echo ""
echo "+====================================================+"
echo "Continue with modem config./install. (y/n)? read ANSWER
if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ]
then
echo ""
echo "1) Make sure that AIX 4.1.4 CDROM is in the Drive."
echo "2) Make sure that PCMCIA (28.8) Card is in the Slot."
echo "Press >>>>CONTROL+C<<<< to exit script if the above"
echo "device and the media"
echo "is not already in the machine."
fi
if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ]
then
# the following two lines should read as one
if [ ! -f /tmp/modem/attr.NEW.IBM ] || [
! -f /tmp/modem/attr.NEW.MHz ]
then
echo "Error in finding script library files."
echo "Exiting script without any configuration."
exit 1
fi
echo "Enter What Modem Type You are using,"
echo "IBM or MHz.(ibm/mhz) Modem Type? read MODEMTYPE
# the following two lines should appear on one line.
if [ "$MODEMTYPE" != "ibm" ] && [ "$MODEMTYPE"
!= "mhz" ]
then
echo "Error. Incorrect Modem Type Entered."
echo "Exiting..."
exit 1
else
echo ""
echo "MAKE SURE THAT THE "
echo "1) MODEM IS IN THE PCMCIA SLOT."
echo "2) MODEM IS INSERTED PROPERLY."
echo 'PRESS >>>control+C<<< if the card is NOT already'
echo "in the slot and then Re-Run this script."
echo "Sleeping for 7 seconds..."
sleep 7
fi
fi
if [ "$ANSWER" = "y" ] || [ "$ANSWER" = "Y" ]
then
clear
header
echo ""
echo "===================================="
echo "Check, Verify Device Driver Routine."
echo "===================================="
if [ -d /usr/lpp/devices.pcmcia.a4001d00 ]
then
echo "You already have the Needed Modem Driver Installed."
echo "Now all we have to do is to configure it."
echo "Sleeping for 10 seconds..."
sleep 10
else
echo "Modem Device Driver NOT installed."
echo "Ensure that AIX 4.1.4 CDROM is in the CDROM Drive."
echo "Waiting for 10 seconds..."
sleep 10
echo "Driver Installation Initiated."
/usr/lib/instl/sm_inst installp_cmd -T iems -L -q -a -d
# the following two lines should read as one.
'/dev/cd0' -o '4.1.3.0 devices.pcmcia.a4001d00
ALL @@devices.pcmcia.a40 01d00' '-c' '-N' '-g' '-X' '-G'
sleep 10
if [ $? = 0 ]
then
echo "Installation Complete and Successful.."
echo "Sleeping for 10 secs..."
sleep 10
else
echo "Installation Encountered a Problem.."
echo "Sleeping for 5 seconds..."
sleep 5
echo "Aborting..."
exit 1
fi
fi
echo ""
clear
header
echo ""
echo "===================================="
echo " RETRIEVE Device Attribute Routine. "
echo "===================================="
echo ""
echo "Next, device attribute for a4002900 will be RETRIEVED."
echo ""
echo "Saving Original Device Attributes to /tmp/attrs.ORIG"
echo ""
/usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdAt > /tmp/attrs.ORIG
/usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdCn >> /tmp/attrs.ORIG
/usr/bin/odmget -q "uniquetype=adapter/pcmcia/a4001d00" PdDv >> /tmp/attrs.ORIG
DATA=`/usr/bin/du -a /tmp/attrs.ORIG | awk '{print $1}'`
if [ "$DATA" = 0 ]
then
echo "There were no attributes defined in the"
echo "ODM for the device."
else
echo "There were no attributes defined in the"
echo "ODM for the device."
fi
echo "The value of ODM DATA is $DATA "
echo "Retrieval Done..."
echo "Sleeping for 10 seconds."
sleep 10
clear
header
echo ""
echo "===================================="
echo " DELETE Device Attribute Routine. "
echo "===================================="
echo ""
echo "Next, device attribute for a4002900 will be DELETED
from ODM."
echo ""
/usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt
/usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt
/usr/bin/odmdelete -q "uniquetype=adapter/pcmcia/a4001d00" -o PdAt
echo ""
echo "Done deleting all the attributes from the ODM database."
echo "Sleeping for 10 seconds..."
sleep 10
clear
header
echo ""
echo "===================================="
echo " ReGenerate Device Attribute in ODM "
echo "===================================="
echo "Earlier you had selected your MODEM TYPE to be: $MODEMTYPE"
echo "Now Creating an ODM entry for $MODEMTYPE modem."
if [ "$MODEMTYPE" = "ibm" ]
then
/usr/bin/odmadd /tmp/modem/attr.NEW.IBM
if [ $? = 0 ]
then
echo "ODM Entry Successful."
ODMSUCCESSFUL=TRUE
sleep 6
else
echo "Error in Creating Entry in ODM."
echo "Critical Error."
if [ "$DATA" != 0 ]
then
echo "Now restoring back the original odm information.."
echo "Please wait..."
sleep 7
/usr/bin/odmadd /tmp/attrs.ORIG
if [ $? = 0 ]
then
rm -f /tmp/attrs.ORIG
fi
sleep
fi
echo "Aboring script"
exit 1
fi
fi
if [ "$MODEMTYPE" = "mhz" ]
then
/usr/bin/odmadd /tmp/modem/attr.NEW.MHz
if [ $? = 0 ]
then
echo "Entry Successful."
ODMSUCCESSFUL=TRUE
sleep 6
else
echo "Error in Creating Entry in ODM."
echo "Critical Error."
echo "Aborting script"
exit 1
fi
fi
echo ""
if [ "$ODMSUCCESSFUL" = "TRUE" ]
then
echo "Since the ODM entry was successful..the script"
echo "will now attempt to see if the Operating System Will"
echo "recognize the PCMCIA card.."
/usr/sbin/cfgmgr
if [ $? = 0 ]
then
CARD=`lscfg|grep -i modem| awk '{print $4,$5,$6,$7,$8}'`
echo ""
echo "============================================"
echo ' Congratulations!!!! '
echo ""
echo "Looks like the confiuration was successful."
echo ""
echo "Card: $CARD."
echo "============================================"
sleep 5
else
echo "AIX, for some odd reason was not able to recognize"
echo "you PCMCIA Card."
fi
fi
echo "All done..."
echo "Modem driver has been Installed and Configured."
echo ""
echo "NOTES:"
echo "During the initialization and configuration of your modem,"
echo "some device attributes files were saved to the temporary"
echo "directory. In most cases you will NOT need these files,"
echo "unless you know that you have a specific/known reason to"
echo "save them."
echo "Do you want to DELETE these files? (y/n)read ANSWER2
if [ "$ANSWER2" = "y" ] || [ "$ANSWER2" = "Y" [
then
echo "Deleting Original Configuration files."
/usr/bin/rm -f /tmp/attrs.ORIG
echo "Deleted files."
echo "ALL DONE."
fi
else
echo "You selected NOT to run this configuration for the answer..."
echo "Script Aborting...."
fi
# *********************** END OF SCRIPT ***********************